Skip to content

Commit

Permalink
test(e2e): add test skipping method
Browse files Browse the repository at this point in the history
- Allows skipping tests based on platform by include `@skip{platform}CI` in the test name

Signed-off-by: Zacharias Fragkiadakis <[email protected]>
  • Loading branch information
QZera committed Jan 4, 2025
1 parent 93c47a2 commit cf661db
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/e2e/wdio.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ if (!process.env['CI']) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const vscodeVersion = (packageJson.engines.vscode as string).replace(/^\^/, '')

const skipTestsGrep = []

switch (process.platform) {
case 'darwin':
skipTestsGrep.push('@skipMacOSCI')
break
case 'linux':
skipTestsGrep.push('@skipLinuxCI')
break
}

// TODO: Bump webdriverio to v9 once wdio-vscode-service supports it
// Relevant PR: https://github.com/webdriverio-community/wdio-vscode-service/pull/130
// Relevant Issue: https://github.com/webdriverio-community/wdio-vscode-service/issues/140
Expand Down Expand Up @@ -52,6 +63,8 @@ export const config: Options.Testrunner = {
mochaOpts: {
ui: 'bdd',
timeout: 60000,
grep: skipTestsGrep.length > 0 ? skipTestsGrep.join('|') : undefined,
invert: true,
},
onPrepare: async () => {
await $`mkdir -p ${path.join(rootDirPath, 'node_modules/.cache/wdio')}`
Expand Down

0 comments on commit cf661db

Please sign in to comment.