Fix CI tests
There's a bunch of generated files that webpack relies on to work, and Karma works off webpack. To make both happy we've added a new `build:genfiles` script which takes care of this for us. We also have to install and build our other layers to get the same effect (like generating the react-sdk's component index, while we still have one). This commit also fixes all the imports in the tests because they were just wrong. They should have been caught in the ES6ification earlier, but were missed.
This commit is contained in:
parent
3b688aaeb8
commit
a978a6734f
7 changed files with 31 additions and 40 deletions
|
@ -35,10 +35,11 @@
|
|||
"reskindex": "reskindex -h src/header",
|
||||
"reskindex:watch": "reskindex -h src/header -w",
|
||||
"clean": "rimraf lib webapp electron_app/dist",
|
||||
"build": "yarn clean && yarn build:res && yarn build:compile && yarn build:types && yarn build:bundle",
|
||||
"build": "yarn clean && yarn build:genfiles && yarn build:compile && yarn build:types && yarn build:bundle",
|
||||
"build:res": "node scripts/copy-res.js",
|
||||
"build:genfiles": "yarn reskindex && yarn build:res",
|
||||
"build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js",
|
||||
"build:compile": "yarn reskindex && babel -d lib --verbose --extensions \".ts,.js\" src",
|
||||
"build:compile": "babel -d lib --verbose --extensions \".ts,.js\" src",
|
||||
"build:bundle": "cross-env NODE_ENV=production webpack -p --progress --bail --mode production",
|
||||
"build:electron": "yarn build && yarn install:electron && electron-builder -wml --ia32 --x64",
|
||||
"build:electron:linux": "yarn build && electron-builder -l --x64",
|
||||
|
@ -56,8 +57,8 @@
|
|||
"lint:ts": "echo 'We don't actually have a typescript linter at this layer because tslint is being removed from our stack. Presumably your TS is fine.'",
|
||||
"lint:types": "tsc --noEmit",
|
||||
"lint:style": "stylelint 'res/css/**/*.scss'",
|
||||
"test": "karma start --single-run=true --autoWatch=false --browsers VectorChromeHeadless",
|
||||
"test:multi": "karma start"
|
||||
"test": "yarn build:genfiles && karma start --single-run=true --autoWatch=false --browsers VectorChromeHeadless",
|
||||
"test:multi": "yarn build:genfiles && karma start"
|
||||
},
|
||||
"dependencies": {
|
||||
"browser-request": "^0.3.3",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue