Skip to content

docs: add typescript & angular usage section#10

Merged
brrianalexis merged 2 commits intotesting-library:masterfrom
brrianalexis:angular-docs
Dec 18, 2020
Merged

docs: add typescript & angular usage section#10
brrianalexis merged 2 commits intotesting-library:masterfrom
brrianalexis:angular-docs

Conversation

@brrianalexis
Copy link
Copy Markdown
Member

  • Documentation
  • Ready to be merged

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 15, 2020

Codecov Report

Merging #10 (7ae0816) into master (8e61829) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e61829...7ae0816. Read the comment docs.

Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown

@ghost ghost Dec 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In your tests setup file (test.ts in an Angular project), import jasmine-dom and add to the Jasmine matchers like so:

Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@brrianalexis brrianalexis merged commit 2443072 into testing-library:master Dec 18, 2020
@brrianalexis brrianalexis deleted the angular-docs branch December 18, 2020 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant