Skip to content

Commit

Permalink
fix(protractor): ensure setup tranformation
Browse files Browse the repository at this point in the history
  • Loading branch information
stoffeastrom committed Jun 26, 2018
1 parent 447488d commit 10cfcef
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions commands/protractor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"homepage": "https://github.com/qlik-oss/after-work.js#readme",
"dependencies": {
"@after-work.js/server": "^5.0.0-beta.0",
"@after-work.js/register": "^5.0.0-beta.0",
"@after-work.js/utils": "^5.0.0-beta.0",
"extend": "3.0.1",
"handlebars": "4.0.11",
"highlight.js": "9.12.0",
Expand Down
15 changes: 14 additions & 1 deletion commands/protractor/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
const path = require('path');
const extend = require('extend');
const fs = require('fs');
const utils = require('@after-work.js/utils');
const options = require('./options');

const protractor = {
Expand All @@ -24,9 +25,18 @@ const protractor = {
},
builder(yargs) {
return yargs
.options(options);
.options(options)
.coerce('babel', utils.coerceBabel)
.coerce('typescript', utils.coerceTypescript);
},
handler(argv) {
argv.instrument = { //eslint-disable-line
testExclude: {
shouldInstrument() {
return false;
},
},
};
if (argv.presetEnv) {
require(argv.presetEnv);
}
Expand All @@ -45,6 +55,9 @@ const protractor = {
}
}
const config = protractor.getConfig(argv);
if (argv.hookRequire) {
require('@after-work.js/register')(argv);
}
argv.require.map(require);
if (argv.glob.length) {
config.specs = argv.glob;
Expand Down
2 changes: 1 addition & 1 deletion commands/protractor/src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = {
},
type: 'object',
},
tsc: {
typescript: {
description: 'Path to typescript compiler module',
default: 'typescript',
type: 'string',
Expand Down

0 comments on commit 10cfcef

Please sign in to comment.