diff --git a/simon-says/src/__snapshots__/app.test.js.snap b/simon-says/src/__snapshots__/app.test.js.snap index ce50593a1264fefe9e1e6f5b2728f70ba16a88e5..186758be9e5fa041b4ae6a218caffcdf52a90708 100644 --- a/simon-says/src/__snapshots__/app.test.js.snap +++ b/simon-says/src/__snapshots__/app.test.js.snap @@ -1,5 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`the app has four colored buttons, red, blue, yellow, and green 1`] = `<div />`; + exports[`the app has one labeled button that displays the value from the store 1`] = ` <div> <label> diff --git a/simon-says/src/app.test.js b/simon-says/src/app.test.js index c329744e99248ed8913ba8c16979355eb2a099c1..6dbc5fd5c380d54fbaa1e9545a4cb40775ffbd3e 100644 --- a/simon-says/src/app.test.js +++ b/simon-says/src/app.test.js @@ -1,5 +1,3 @@ -/* eslint-disable no-magic-numbers */ - import React from 'react'; import { render } from '@testing-library/react'; import './testing/mockRedux.js'; @@ -7,16 +5,23 @@ import { MemoryRouter as Router } from 'react-router-dom'; import { App } from './app.js'; -import { - selectValue, -} from './features/counter/counterSlice.js'; -jest.mock('./features/counter/counterSlice.js', () => ({ - selectValue: jest.fn().mockName('selectValue'), +jest.mock('./features/patternGen/patternSlice.js', () => ({ + selectColorOne: jest.fn().mockName('selectColorOne'), + showColorOne: jest.fn().mockName('showColorOne'), + hideColorOne: jest.fn().mockName('hideColorOne'), + selectColorTwo: jest.fn().mockName('selectColorTwo'), + showColorTwo: jest.fn().mockName('showColorTwo'), + hideColorTwo: jest.fn().mockName('hideColorTwo'), + selectColorThree: jest.fn().mockName('selectColorThree'), + showColorThree: jest.fn().mockName('showColorThree'), + hideColorThree: jest.fn().mockName('hideColorThree'), + selectColorFour: jest.fn().mockName('selectColorFour'), + showColorFour: jest.fn().mockName('showColorFour'), + hideColorFour: jest.fn().mockName('hideColorFour'), })); describe('the app', () => { - test('has one labeled button that displays the value from the store', () => { - selectValue.mockReturnValue(9999); + test('has four colored buttons, red, blue, yellow, and green', () => { const { container } = render( <Router initialEntries={['/']}> <App />