Skip to content

Commit

Permalink
Extract gherkin-runner to separate module
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davwards committed Dec 9, 2017
1 parent 36d7415 commit 636065c
Show file tree
Hide file tree
Showing 6 changed files with 322 additions and 1,002 deletions.
5 changes: 4 additions & 1 deletion web-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"packages/*"
],
"devDependencies": {
"lerna": "^2.5.1"
"babel-preset-env": "^1.3.2"
},
"babel": {
"presets": [ "env" ]
}
}
File renamed without changes.
8 changes: 8 additions & 0 deletions web-client/packages/gherkin-runner/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "gherkin-runner",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"private": true
}

7 changes: 4 additions & 3 deletions web-client/packages/gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"test": "jest src"
},
"dependencies": {
"remote-game-client": "1.0.0",
"game-engine": "1.0.0",
"vue": "^2.3.3",
"vue-router": "^2.3.1"
},
Expand Down Expand Up @@ -41,15 +43,14 @@
"extract-text-webpack-plugin": "^2.0.0",
"file-loader": "^0.11.1",
"friendly-errors-webpack-plugin": "^1.1.3",
"game-engine": "1.0.0",
"gherkin-runner": "1.0.0",
"html-webpack-plugin": "^2.28.0",
"http-proxy-middleware": "^0.17.3",
"jest": "^20.0.4",
"jest": "21.3.0-beta.3",
"jest-vue-preprocessor": "^1.0.1",
"opn": "^4.0.2",
"optimize-css-assets-webpack-plugin": "^1.3.0",
"ora": "^1.2.0",
"remote-game-client": "1.0.0",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import RecurringTaskSubform from './recurring-task-subform'
import Vue from 'vue'
import { runGherkinUnitTests } from 'gherkin-runner'

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

const feature = `
Expand Down
Loading

0 comments on commit 636065c

Please sign in to comment.