Skip to content

Commit 110e340

Browse files
authored
Merge pull request #2060 from RedisInsight/e2e/bugfix/testcafe-compiler-fix
testcafe typescript compiler fix
2 parents ac8c522 + f519227 commit 110e340

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

tests/e2e/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build:web": "yarn --cwd ../../ build:web",
1313
"redis:last": "docker run --name redis-last-version -p 7777:6379 -d redislabs/redismod",
1414
"start:app": "cross-env SERVER_STATIC_CONTENT=true yarn start:api",
15-
"test:chrome": "testcafe --cache --concurrency 1 chrome tests/ -r html:./report/report.html,spec -e -s takeOnFails=true,path=report/screenshots,pathPattern=${OS}_${BROWSER}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png",
15+
"test:chrome": "testcafe --compiler-options typescript.configPath=tsconfig.testcafe.json --cache --concurrency 1 chrome tests/ -r html:./report/report.html,spec -e -s takeOnFails=true,path=report/screenshots,pathPattern=${OS}_${BROWSER}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png",
1616
"test:chrome:ci": "ts-node ./web.runner.ts",
1717
"test": "yarn test:chrome",
1818
"lint": "eslint . --ext .ts,.js,.tsx,.jsx",

tests/e2e/tsconfig.testcafe.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"compilerOptions": {
3+
"types": []
4+
}
5+
}

tests/e2e/web.runner.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import testcafe from 'testcafe';
55
.then(t => {
66
return t
77
.createRunner()
8+
.compilerOptions({
9+
"typescript": {
10+
configPath: 'tsconfig.testcafe.json',
11+
experimentalDecorators: true
12+
}})
813
.src((process.env.TEST_FILES || 'tests/**/*.e2e.ts').split('\n'))
914
.browsers(['chromium:headless --cache --allow-insecure-localhost --ignore-certificate-errors'])
1015
.filter((_testName, _fixtureName, _fixturePath, testMeta): boolean => {

0 commit comments

Comments
 (0)