Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Align WTR configs, add missing README #4

Merged
merged 1 commit into from
Dec 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;