Skip to content

Commit

Permalink
fix: change the options given to typescript compiler
Browse files Browse the repository at this point in the history
the options object from the API has to be destructured to retrieve the typescript property and pass
it to the typescript compiler, instead of passing the whole object

BREAKING CHANGE: the new version will only work with testcafe 1.10 and above

#24
  • Loading branch information
Arthur Warnier committed Feb 4, 2021
1 parent c55e0f8 commit 6514445
Show file tree
Hide file tree
Showing 3 changed files with 1,177 additions and 880 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@
},
"peerDependencies": {
"cucumber": "^5.1.0",
"testcafe": "^1.3.3"
"testcafe": "^1.10.1"
},
"devDependencies": {
"commitizen": "^4.2.1",
"cucumber": "^5.1.0",
"cz-conventional-changelog": "3.3.0",
"prettier": "^1.17.1",
"standard-version": "^9.1.0",
"testcafe": "^1.8.6"
"testcafe": "^1.10.1"
},
"config": {
"commitizen": {
Expand Down
5 changes: 3 additions & 2 deletions src/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const testRunTracker = require('testcafe/lib/api/test-run-tracker');
const cucumberExpressions = require('cucumber-expressions');
const TestcafeESNextCompiler = require('testcafe/lib/compiler/test-file/formats/es-next/compiler');
const TestcafeTypescriptCompiler = require('testcafe/lib/compiler/test-file/formats/typescript/compiler');
const CustomizableCompilers = require('testcafe/lib/configuration/customizable-compilers');
const { readFileSync } = require('fs');
const chalk = require('chalk');

Expand Down Expand Up @@ -54,8 +55,8 @@ module.exports = class GherkinTestcafeCompiler {
this.tags = getTags();
this.cucumberExpressionParamRegistry = getParameterTypeRegistry();
this.externalCompilers = [
new TestcafeESNextCompiler(compilerOptions),
new TestcafeTypescriptCompiler(compilerOptions)
new TestcafeESNextCompiler(),
new TestcafeTypescriptCompiler(compilerOptions[CustomizableCompilers.typescript])
];
}

Expand Down
Loading

0 comments on commit 6514445

Please sign in to comment.