Skip to content

Commit c46a0f1

Browse files
committed
Use babel test for testing the babel plugin
babel-test supports writing transformed code to individual output.js files while still integrating with Jest snapshots. This means that we get syntax highlighting in the transformed files making it easier to spot mistakes.
1 parent 28ce9fa commit c46a0f1

File tree

52 files changed

+842
-846
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+842
-846
lines changed

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
"@babel/preset-env": "^7.0.0",
2222
"babel-core": "7.0.0-bridge.0",
2323
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
24+
"babel-test": "^0.1.2",
2425
"jest": "^23.6.0",
26+
"jest-file-snapshot": "^0.3.2",
2527
"prettier": "^1.14.2",
2628
"rimraf": "^2.6.2",
2729
"styled-components": "^4.0.0"
@@ -55,8 +57,12 @@
5557
"displayName"
5658
],
5759
"jest": {
60+
"testEnvironment": "node",
5861
"snapshotSerializers": [
5962
"<rootDir>/test/whitespaceTrimmingSerializer.js"
63+
],
64+
"watchPathIgnorePatterns": [
65+
"fixtures\\/[^/]+\\/(output|error)\\.js"
6066
]
6167
}
6268
}

0 commit comments

Comments
 (0)