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

Commit

Permalink
refactor: update wdio.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
goosewobbler committed Feb 21, 2024
1 parent e3a460b commit 0e48778
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 52 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"@wdio/cli": "^8.32.2",
"@wdio/local-runner": "^8.32.2",
"@wdio/mocha-framework": "^8.32.2",
"@wdio/types": "^8.32.2",
"autoprefixer": "^10.4.17",
"babel-loader": "^9.1.3",
"ci-info": "^4.0.0",
Expand Down Expand Up @@ -132,6 +133,7 @@
"react-redux": "^9.1.0",
"react-refresh": "^0.14.0",
"react-tabs": "^6.0.2",
"read-package-up": "^11.0.0",
"redux": "^5.0.1",
"source-map-loader": "^5.0.0",
"source-map-support": "^0.5.21",
Expand Down
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 0 additions & 52 deletions wdio.conf.js

This file was deleted.

44 changes: 44 additions & 0 deletions wdio.conf.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import url from 'node:url';
import path from 'node:path';
import fs from 'node:fs';
import type { Options } from '@wdio/types';
import type { PackageJson } from 'read-package-up';

const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
const packageJson = JSON.parse(
fs.readFileSync(path.join(__dirname, 'package.json'), { encoding: 'utf-8' }),
) as PackageJson;

globalThis.packageJson = packageJson;
process.env.TEST = 'true';

export const config: Options.Testrunner = {
services: ['electron'],
capabilities: [
{
'browserName': 'electron',
'wdio:electronServiceOptions': {
restoreMocks: true,
},
} as WebdriverIO.Capabilities,
],
waitforTimeout: 5000,
connectionRetryCount: 10,
connectionRetryTimeout: 30000,
logLevel: 'debug',
runner: 'local',
outputDir: 'wdio-logs',
specs: ['test/e2e/*.spec.ts'],
autoCompileOpts: {
autoCompile: true,
tsNodeOpts: {
transpileOnly: true,
project: path.join(__dirname, 'tsconfig.json'),
},
},
framework: 'mocha',
mochaOpts: {
ui: 'bdd',
timeout: 30000,
},
};

0 comments on commit 0e48778

Please sign in to comment.