Skip to content

Commit 636065c

Browse files
committed
Extract gherkin-runner to separate module
Discovered while doing this some weirdness involving babel transpilation. gherkin-runner wasn't getting transpiled when tests run. Found some discussion of the issue, including an indication that a fix is due out in jest soon: jestjs/jest#4761 I updated jest to 21.3.0-beta.3 to see if that helped. It didn't at first, which turned out to be because it wasn't under the original package directory, so babel didn't know what transforms to run (?). (These thoughts are based on discussion here:) babel/babel-loader#293 I added some babel configuration to the root-level package.json which fixed the issue.
1 parent 36d7415 commit 636065c

File tree

6 files changed

+322
-1002
lines changed

6 files changed

+322
-1002
lines changed

web-client/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"packages/*"
55
],
66
"devDependencies": {
7-
"lerna": "^2.5.1"
7+
"babel-preset-env": "^1.3.2"
8+
},
9+
"babel": {
10+
"presets": [ "env" ]
811
}
912
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "gherkin-runner",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"license": "MIT",
6+
"private": true
7+
}
8+

web-client/packages/gui/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"test": "jest src"
1313
},
1414
"dependencies": {
15+
"remote-game-client": "1.0.0",
16+
"game-engine": "1.0.0",
1517
"vue": "^2.3.3",
1618
"vue-router": "^2.3.1"
1719
},
@@ -41,15 +43,14 @@
4143
"extract-text-webpack-plugin": "^2.0.0",
4244
"file-loader": "^0.11.1",
4345
"friendly-errors-webpack-plugin": "^1.1.3",
44-
"game-engine": "1.0.0",
46+
"gherkin-runner": "1.0.0",
4547
"html-webpack-plugin": "^2.28.0",
4648
"http-proxy-middleware": "^0.17.3",
47-
"jest": "^20.0.4",
49+
"jest": "21.3.0-beta.3",
4850
"jest-vue-preprocessor": "^1.0.1",
4951
"opn": "^4.0.2",
5052
"optimize-css-assets-webpack-plugin": "^1.3.0",
5153
"ora": "^1.2.0",
52-
"remote-game-client": "1.0.0",
5354
"rimraf": "^2.6.0",
5455
"semver": "^5.3.0",
5556
"shelljs": "^0.7.6",

web-client/packages/gui/src/tasks/recurring-task-subform.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import RecurringTaskSubform from './recurring-task-subform'
22
import Vue from 'vue'
3+
import { runGherkinUnitTests } from 'gherkin-runner'
34

45
import { testMount, select, findInput } from '../test-helpers/dom-manipulations'
5-
import { runGherkinUnitTests } from '../test-helpers/gherkin-runner'
66

77
const feature = `
88

0 commit comments

Comments
 (0)