Skip to content

Commit

Permalink
Align WTR configs, add missing README (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Dec 28, 2020
1 parent 843fa02 commit f16855f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 5 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Components monorepo experiment

## Setup

```sh
yarn
```

## Run all tests in Chrome

```sh
yarn test
```

## Run all tests in Playwright

```sh
yarn test:playwright
```

## Run tests for single package

```sh
yarn test --group vaadin-upload
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"packages/*"
],
"scripts": {
"test": "web-test-runner packages/**/test/*.test.js --coverage",
"test": "web-test-runner --coverage",
"test:playwright": "web-test-runner --config web-test-runner-playwright.config.js"
},
"devDependencies": {
Expand Down
20 changes: 16 additions & 4 deletions web-test-runner.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
/* eslint-env node */
const config = {
const fs = require('fs');

const packages = fs
.readdirSync('packages')
.filter(
dir => fs.statSync(`packages/${dir}`).isDirectory() && fs.existsSync(`packages/${dir}/test`),
);

module.exports = {
nodeResolve: true,
browserStartTimeout: 60000, // default 30000
testsStartTimeout: 60000, // default 10000
Expand All @@ -18,7 +26,11 @@ const config = {
ui: 'bdd',
timeout: '10000'
}
}
},
groups: packages.map(pkg => {
return {
name: pkg,
files: `packages/${pkg}/test/*.test.js`,
};
}),
};

module.exports = config;

0 comments on commit f16855f

Please # to comment.