Skip to content

Commit 7102d07

Browse files
committed
docs: Update README with advice for use with jest
closes #58
1 parent 43495c5 commit 7102d07

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,24 @@ After that, you can run the tests via:
114114
npm test
115115
```
116116

117+
## Tips
118+
119+
### Use Mentoss with Jest
120+
121+
[Jest](https://jestjs.io) doesn't support ESM-only modules (like Mentoss) by default. You'll need to update how you call Jest in your `package.json` file to enable ESM support:
122+
123+
```diff
124+
"scripts": {
125+
- "test": "jest",
126+
+ "test": "node --experimental-vm-modules ./node_modules/.bin/jest"
127+
}
128+
```
129+
130+
Read more about ESM support in the [Jest documentation](https://jestjs.io/docs/ecmascript-modules).
131+
117132
## License
118133

119-
Copyright 2024 Nicholas C. Zakas
134+
Copyright 2024-2025 Nicholas C. Zakas
120135

121136
Licensed under the Apache License, Version 2.0 (the "License");
122137
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)