Skip to content

Commit

Permalink
add note how to run both test runners
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Feb 13, 2024
1 parent a3e6710 commit 4469715
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion docs/testing/webdriverio/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,19 @@ We recommend to create a new NPM script for running both, Stencil and WebdriverI
"test.e2e": "stencil test && wdio run wdio.conf.ts"
}
}
```
```

Make sure that each test runner picks up their respective tests by defining the `testRegex` property in your Stencil config, e.g.:

```ts title="stencil.config.ts"
import { Config } from '@stencil/core';

export const config: Config = {
// ...
testing: {
testRegex: '(/__tests__/.*|\\.?(spec))\\.(ts|js)$',
},
};
```

This will make Stencil pick up all files ending with `.spec.ts` or `.spec.js` while WebdriverIO picks up tests ending with `.test.ts`.

0 comments on commit 4469715

Please sign in to comment.