adding some instructions for step5 exercise and make sure jest doesn't do anything with docs

This commit is contained in:
Ken
2019-02-20 12:20:30 -08:00
parent 4f1e5ff2d0
commit 9bce24d819
4 changed files with 15 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
testEnvironment: 'node' testEnvironment: 'node',
testPathIgnorePatterns: ['/node_modules/', '/docs/']
}; };

View File

@@ -9,11 +9,17 @@ describe('TodoApp reducers', () => {
const keys = Object.keys(newState); 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(newState).not.toBe(state);
expect(keys.length).toBe(1); expect(keys.length).toBe(1);
expect(newState[keys[0]].label).toBe('item1'); expect(newState[keys[0]].label).toBe('item1');
expect(newState[keys[0]].completed).toBeFalsy(); expect(newState[keys[0]].completed).toBeFalsy();
*/
}); });
// test remove, complete and clear // TODO: test remove, complete and clear
}); });

View File

@@ -1,6 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<body> <body>
<div id="app"></div> For this step, we look at unit testing. Run
<pre>npm test</pre>
in the command line.
</body> </body>
</html> </html>

View File

@@ -1,6 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<body> <body>
<div id="app"></div> For this step, we look at unit testing. Run
<pre>npm test</pre>
in the command line.
</body> </body>
</html> </html>