mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-04-08 11:56:41 +00:00
generalize paths
This commit is contained in:
parent
09f4571fde
commit
89c9920269
1 changed files with 4 additions and 4 deletions
|
@ -15,12 +15,12 @@ In `package.json`:
|
||||||
"jest": {
|
"jest": {
|
||||||
// calls additional setups for enzyme, react tesing library, ...
|
// calls additional setups for enzyme, react tesing library, ...
|
||||||
"setupFiles": [
|
"setupFiles": [
|
||||||
"./tools/testSetup.js"
|
"path/to/testSetup.js"
|
||||||
],
|
],
|
||||||
"moduleNameMapper": {
|
"moduleNameMapper": {
|
||||||
// file imports to ignore
|
// file imports to ignore
|
||||||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/tools/fileMock.js",
|
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "path/to/fileMock.js",
|
||||||
"\\.(css|less)$": "<rootDir>/tools/styleMock.js"
|
"\\.(css|less)$": "path/to/styleMock.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ it("test descrtiption", () => {
|
||||||
### Enzyme Configuration
|
### Enzyme Configuration
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// <root>/tools/testSetup.js
|
// testSetup.js
|
||||||
import { configure } from "enzyme";
|
import { configure } from "enzyme";
|
||||||
import Adapter from "enzyme-adapert-react-<version>";
|
import Adapter from "enzyme-adapert-react-<version>";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue