Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(protractor): ensure setup tranformation #273

Merged
merged 1 commit into from
Jun 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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