Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit c0ea515

Browse files
authored
fix(protractor): ensure setup tranformation (#273)
1 parent 447488d commit c0ea515

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

commands/protractor/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"homepage": "https://github.com/qlik-oss/after-work.js#readme",
2323
"dependencies": {
2424
"@after-work.js/server": "^5.0.0-beta.0",
25+
"@after-work.js/register": "^5.0.0-beta.0",
26+
"@after-work.js/utils": "^5.0.0-beta.0",
2527
"extend": "3.0.1",
2628
"handlebars": "4.0.11",
2729
"highlight.js": "9.12.0",

commands/protractor/src/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
const path = require('path');
33
const extend = require('extend');
44
const fs = require('fs');
5+
const utils = require('@after-work.js/utils');
56
const options = require('./options');
67

78
const protractor = {
@@ -24,9 +25,18 @@ const protractor = {
2425
},
2526
builder(yargs) {
2627
return yargs
27-
.options(options);
28+
.options(options)
29+
.coerce('babel', utils.coerceBabel)
30+
.coerce('typescript', utils.coerceTypescript);
2831
},
2932
handler(argv) {
33+
argv.instrument = { //eslint-disable-line
34+
testExclude: {
35+
shouldInstrument() {
36+
return false;
37+
},
38+
},
39+
};
3040
if (argv.presetEnv) {
3141
require(argv.presetEnv);
3242
}
@@ -45,6 +55,9 @@ const protractor = {
4555
}
4656
}
4757
const config = protractor.getConfig(argv);
58+
if (argv.hookRequire) {
59+
require('@after-work.js/register')(argv);
60+
}
4861
argv.require.map(require);
4962
if (argv.glob.length) {
5063
config.specs = argv.glob;

commands/protractor/src/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = {
4646
},
4747
type: 'object',
4848
},
49-
tsc: {
49+
typescript: {
5050
description: 'Path to typescript compiler module',
5151
default: 'typescript',
5252
type: 'string',

0 commit comments

Comments
 (0)