-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Running jest without babel. Using [email protected] because of the following error: ``` TypeError: Jest: a transform must export a `process` function. ``` See kenotron/esm-jest#5 (comment)
- Loading branch information
Showing
5 changed files
with
2,394 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
transform: { | ||
"\\.m?jsx?$": "esm" | ||
}, | ||
moduleNameMapper: { | ||
"^anotherRoot/(.*)$": "<rootDir>/lib/anotherRoot/$1" | ||
}, | ||
transformIgnorePatterns: [] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
"lint:precommit": "echo \"No precommit linting yet\" && exit 0", | ||
"test:precommit": "npm test", | ||
"pretty": "npx prettier --write '**/*.{tsx,ts,js,jsx,json,css,scss,md}'", | ||
"test": "echo \"No test specified yet\" && exit 0" | ||
"test": "npx jest --runInBand --no-cache --config jest.config.js" | ||
}, | ||
"lint-staged": { | ||
"**/*.{tsx,ts,js,jsx,json,css,scss,md}": [ | ||
|
@@ -24,7 +24,9 @@ | |
"author": "Christophe Rosset <[email protected]> (http://labs.topheman.com/)", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"esm": "3.1.0", | ||
"husky": "^1.3.1", | ||
"jest": "^24.8.0", | ||
"lint-staged": "^8.1.0", | ||
"prettier": "1.18.2", | ||
"serve": "^11.1.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { reducer } from "./logic"; | ||
|
||
describe("logic.reducer", () => { | ||
it("default state - ADD function should resolve to 1", () => { | ||
expect(reducer(undefined, { type: "ADD" })).toBe(1); | ||
}); | ||
}); |
Oops, something went wrong.