mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-30 04:39:03 +01:00
Mention facebook/jest#2549 in the README (#1700)
This commit is contained in:
parent
d17f70fd52
commit
e69d90320a
14
README.md
14
README.md
@ -142,6 +142,20 @@ Sass's support for the legacy JavaScript API has the following limitations:
|
||||
[`precision`]: https://github.com/sass/node-sass#precision
|
||||
[`sourceComments`]: https://github.com/sass/node-sass#sourcecomments
|
||||
|
||||
#### Using Sass with Jest
|
||||
|
||||
If you're using [Jest] to run your tests, be aware that it has a [longstanding
|
||||
bug] where its default test environment breaks JavaScript's built-in
|
||||
[`instanceof` operator]. Dart Sass's JS package uses `instanceof` fairly
|
||||
heavily, so in order to avoid breaking Sass you'll need to install
|
||||
[`jest-environment-node-single-context`] and add `testEnvironment:
|
||||
'jest-environment-node-single-context'` to your Jest config.
|
||||
|
||||
[Jest]: https://jestjs.io/
|
||||
[longstanding bug]: https://github.com/facebook/jest/issues/2549
|
||||
[`instanceof` operator]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof
|
||||
[`jest-environment-node-single-context`]: https://www.npmjs.com/package/jest-environment-node-single-context
|
||||
|
||||
### From Pub
|
||||
|
||||
If you're a Dart user, you can install Dart Sass globally using `pub global
|
||||
|
Loading…
Reference in New Issue
Block a user