Skip to content

Commit 2d16a01

Browse files
authored
test(extension): check if walletConfiguration.ts exists before running tests (#1400)
1 parent 6063b92 commit 2d16a01

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/e2e-tests/wdio.conf.base.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* eslint-disable no-undef */
22

33
import extensionUtils from './src/utils/utils';
4+
import fs from 'fs';
5+
import { Logger } from './src/support/logger';
46

57
export const config: WebdriverIO.Config = {
68
runner: 'local',
@@ -140,5 +142,12 @@ export const config: WebdriverIO.Config = {
140142
timeout: 200_000,
141143
retry: 1,
142144
noStrictFlaky: true
143-
} as WebdriverIO.CucumberOpts
145+
} as WebdriverIO.CucumberOpts,
146+
async onPrepare() {
147+
if (!fs.existsSync('./src/support/walletConfiguration.ts')) {
148+
Logger.log('walletConfiguration.ts is missing, decrypt the file first!');
149+
// eslint-disable-next-line unicorn/no-process-exit
150+
process.exit(1);
151+
}
152+
}
144153
};

0 commit comments

Comments
 (0)