Skip to content
This repository was archived by the owner on Jun 22, 2022. It is now read-only.

Commit 65419a1

Browse files
committed
Get mocks at realtime instead exporting Mocks and resetting modules
1 parent a97db8c commit 65419a1

File tree

11 files changed

+1920
-3577
lines changed

11 files changed

+1920
-3577
lines changed

.babelrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ const env = process.env.BABEL_ENV || process.env.NODE_ENV;
33
const config = {
44
presets: [
55
"@babel/typescript",
6-
"@babel/stage-3",
76
["@babel/env", {
87
targets: {
9-
node: "8"
8+
node: "10"
109
},
1110
modules: "commonjs",
1211
}],

.vscode/launch.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"protocol": "inspector",
11+
"name": "Debug current test file",
12+
"console": "internalConsole",
13+
"internalConsoleOptions": "neverOpen",
14+
"showAsyncStacks": true,
15+
"useWSL": true,
16+
"port": 9229,
17+
"cwd": "${workspaceFolder}",
18+
"runtimeArgs": [
19+
"--inspect-brk=9229",
20+
"./node_modules/jest/bin/jest.js",
21+
"--runTestsByPath",
22+
"--runInBand",
23+
"${relativeFile}",
24+
],
25+
"sourceMaps": true,
26+
"smartStep": true
27+
}
28+
]
29+
}

package.json

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jest-mock-external-components",
3-
"version": "1.0.7",
3+
"version": "2.0.0",
44
"description": "Mock external React components with jest",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",
@@ -30,28 +30,33 @@
3030
"prepare": "run-s clean build"
3131
},
3232
"devDependencies": {
33-
"@babel/cli": "^7.0.0-beta.49",
34-
"@babel/core": "^7.0.0-beta.49",
35-
"@babel/preset-env": "^7.0.0-beta.49",
36-
"@babel/preset-react": "^7.0.0-beta.49",
37-
"@babel/preset-stage-3": "^7.0.0-beta.49",
38-
"@babel/preset-typescript": "^7.0.0-beta.49",
39-
"@types/babel-core": "^6.25.3",
40-
"@types/babel-traverse": "^6.25.3",
41-
"@types/babel-types": "^7.0.2",
42-
"@types/jest": "^22.2.3",
43-
"@types/node": "^10.1.3",
33+
"@babel/cli": "^7.1.5",
34+
"@babel/core": "^7.1.6",
35+
"@babel/parser": "^7.1.6",
36+
"@babel/preset-env": "^7.1.6",
37+
"@babel/preset-react": "^7.0.0",
38+
"@babel/preset-stage-3": "^7.0.0",
39+
"@babel/preset-typescript": "^7.1.0",
40+
"@babel/traverse": "^7.1.6",
41+
"@babel/types": "^7.1.6",
42+
"@types/babel__core": "^7.0.2",
43+
"@types/babel__generator": "^7.0.1",
44+
"@types/babel__template": "^7.0.1",
45+
"@types/babel__traverse": "^7.0.1",
46+
"@types/jest": "^23.3.9",
47+
"@types/node": "^10.12.9",
4448
"babel-core": "^7.0.0-bridge.0",
45-
"babel-jest": "^23.0.1",
46-
"babel-plugin-emotion": "^9.1.2",
49+
"babel-jest": "^23.6.0",
50+
"babel-plugin-emotion": "^9.2.11",
4751
"del-cli": "^1.1.0",
48-
"jest": "^23.0.1",
52+
"jest": "^23.6.0",
4953
"npm-run-all": "^4.1.3",
50-
"typescript": "^2.9.1-insiders.20180525",
51-
"typescript-snapshots-plugin": "^1.2.0"
54+
"typescript": "^3.1.6",
55+
"typescript-snapshots-plugin": "^1.5.3"
5256
},
5357
"peerDependencies": {
5458
"@babel/core": "^7.0.0-beta || ^7.0.0-rc || ^7.0",
5559
"jest": ">= 21.0"
56-
}
60+
},
61+
"dependencies": {}
5762
}

0 commit comments

Comments
 (0)