diff --git a/README.md b/README.md index a04c88b..d58bd94 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,14 @@ minimum code coverage percentage (95%). # Installing and running -First install all dependencies: +First clone this repository and change into the newly cloned directory. The rest of this guide assumes you are in the project's root directory when running commands. + +```shell +$ git clone https://github.com/michikono/typescript-tdd-exercises +$ cd typescript-tdd-exercises +``` + +Then install all dependencies: ```shell $ npm install diff --git a/src/exercise1/README.md b/src/exercise1/README.md index bb9f007..e1d66fd 100644 --- a/src/exercise1/README.md +++ b/src/exercise1/README.md @@ -8,8 +8,7 @@ ## Exercise A -Find and open the [/coverage/reports/lcov-report/index.html](../../coverage/reports/lcov-report/index.html) and navigate -the file. +Find and open the [coverage/reports/lcov-report/index.html](../../coverage/reports/lcov-report/index.html) and navigate the file. You can re-run tests individually by running: @@ -30,22 +29,21 @@ $ grunt watch This is the baseline you want for all of your tests going forward. As you make any changes to TypeScript files, you should see this command trigger events automatically. For example, -try adding a space to [/src/exercise1/word.ts](../../src/exercise1/word.ts) and save it. You will see the `watch` +try adding a space to [src/exercise1/word.ts](word.ts) and save it. You will see the `watch` recompile the TypeScript and run all tests. ## Exercise B Right now, we actually do not have 100% coverage; some test coverage analysis is being suppressed. Edit -[index.ts](./index.ts); remove the line about `istanbul ignore` that looks like this: +[src/exercise1/word.ts](word.ts); remove the line about `istanbul ignore` that looks like this: ```typescript /* istanbul ignore next */ ``` -By removing this line, the class defined below it will begin to count against the code coverage reports. You should notice -your code coverage is no longer at 100%. +By removing this line, the class defined below it will begin to count against the code coverage reports. You should notice your code coverage is no longer at 100%. -Add a test for the `removeVowels()` method. The test should go to [/test/exercise1/word.ts](../../test/exercise1/word.ts) +Add a test for the `removeVowels()` method. The test should go to [test/exercise1/word.ts](../../test/exercise1/word.ts) You should see the coverage report edge back up to 100%. The [exercise 1 coverage report][../../coverage/reports/lcov-report/exercise1/word.js.html] should show the removeVowels @@ -53,7 +51,7 @@ method fully covered (green). You will notice `removeNumbers()` is still red. ## Exercise C -Add a test for the `removeNumbers()` method. The test should go to [/test/exercise1/word.ts](../../test/exercise1/word.ts) +Add a test for the `removeNumbers()` method. The test should go to [test/exercise1/word.ts](../../test/exercise1/word.ts) Note that you want to write the test, *that will fail*. This is because we have not yet added the logic for `removeNumbers()`. *Make sure it fails first.*