docs: add typescript & angular usage section#10
docs: add typescript & angular usage section#10brrianalexis merged 2 commits intotesting-library:masterfrom
Conversation
brrianalexis
commented
Dec 15, 2020
- Documentation
- Ready to be merged
Codecov Report
@@ Coverage Diff @@
## master #10 +/- ##
=======================================
Coverage 99.49% 99.49%
=======================================
Files 21 21
Lines 596 596
=======================================
Hits 593 593
Misses 3 3 Continue to review full report at Codecov.
|
ghost
left a comment
There was a problem hiding this comment.
Great, thanks! Just some tiny changes suggested 👍
README.md
Outdated
| ``` | ||
|
|
||
| That's it! You're good to go. | ||
| ### With Karma and TypeScript in an Angular project |
There was a problem hiding this comment.
To match the title above this should be 'With TypeScript'.
Maybe add (eg. Angular)? nah, I think the difference is really the language...
README.md
Outdated
| That's it! You're good to go. | ||
| ### With Karma and TypeScript in an Angular project | ||
|
|
||
| Add to the existing `types` array in `tsconfig.spec.json`: `"@testing-library/jasmine-dom"` |
There was a problem hiding this comment.
Add "@testing-library/jasmine-dom" to types in the tests tsconfig (tsconfig.spec.json in an Angular project).
Example:
compilerOptions:
types: ["jasmine", "node", "@testing-library/jasmine-dom"],.
README.md
Outdated
|
|
||
| Add to the existing `types` array in `tsconfig.spec.json`: `"@testing-library/jasmine-dom"` | ||
|
|
||
| In your tests setup file, import jasmine-dom like so: |
There was a problem hiding this comment.
In your tests setup file (test.ts in an Angular project), import jasmine-dom and add to the Jasmine matchers like so: