diff --git a/jest.config.js b/jest.config.js index eef6b07..451a812 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,4 +1,5 @@ module.exports = { preset: 'ts-jest', - testEnvironment: 'node' + testEnvironment: 'node', + testPathIgnorePatterns: ['/node_modules/', '/docs/'] }; diff --git a/step2-05/exercise/src/reducers/pureFunctions.spec.ts b/step2-05/exercise/src/reducers/pureFunctions.spec.ts index 4cf3f4a..c8e202a 100644 --- a/step2-05/exercise/src/reducers/pureFunctions.spec.ts +++ b/step2-05/exercise/src/reducers/pureFunctions.spec.ts @@ -9,11 +9,17 @@ describe('TodoApp reducers', () => { const keys = Object.keys(newState); + // make sure that adding an item would not result in the same instance of state + // TODO: uncomment the below to get started + /* + expect(newState).not.toBe(state); + expect(keys.length).toBe(1); expect(newState[keys[0]].label).toBe('item1'); expect(newState[keys[0]].completed).toBeFalsy(); + */ }); - // test remove, complete and clear + // TODO: test remove, complete and clear }); diff --git a/step2-06/demo/index.html b/step2-06/demo/index.html index 454cef5..be1bd8a 100644 --- a/step2-06/demo/index.html +++ b/step2-06/demo/index.html @@ -1,6 +1,8 @@ -
+ For this step, we look at unit testing. Run +
npm test
+ in the command line. diff --git a/step2-06/exercise/index.html b/step2-06/exercise/index.html index 454cef5..be1bd8a 100644 --- a/step2-06/exercise/index.html +++ b/step2-06/exercise/index.html @@ -1,6 +1,8 @@ -
+ For this step, we look at unit testing. Run +
npm test
+ in the command line.