Skip to content

Commit 7935118

Browse files
committed
Exclude some tests to reduce Safari flakiness
1 parent 1ff9867 commit 7935118

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"screenshots": "hermione test/visual/test.js --update-refs",
4242
"start": "web-dev-server --node-resolve --open",
4343
"test": "web-test-runner test/*.test.js --coverage",
44-
"test:firefox": "TEST_ENV=firefox npm test",
45-
"test:safari": "TEST_ENV=safari npm test",
44+
"test:firefox": "TEST_ENV=firefox web-test-runner",
45+
"test:safari": "TEST_ENV=safari web-test-runner",
4646
"test:visual": "hermione test/visual/test.js"
4747
},
4848
"husky": {

web-test-runner.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint-env node */
22
const { createSauceLabsLauncher } = require('@web/test-runner-saucelabs');
3+
const fs = require('fs');
34

45
const config = {
56
nodeResolve: true,
@@ -38,6 +39,21 @@ const sauce = {
3839
};
3940

4041
if (env === 'firefox' || env === 'safari') {
42+
// Exclude some tests to reduce Safari flakiness
43+
const exclude = [
44+
'all-imports.test.js',
45+
'extension.test.js',
46+
'hidden-grid.test.js',
47+
'iron-list.test.js',
48+
'missing-imports.test.js',
49+
'resizing-material.test.js'
50+
];
51+
52+
const tests = fs
53+
.readdirSync('./test/')
54+
.filter((file) => file.includes('test.js') && !exclude.includes(file))
55+
.map((file) => `test/${file}`);
56+
4157
const sauceLabsLauncher = createSauceLabsLauncher({
4258
user: process.env.SAUCE_USERNAME,
4359
key: process.env.SAUCE_ACCESS_KEY
@@ -50,6 +66,7 @@ if (env === 'firefox' || env === 'safari') {
5066
}
5167
};
5268

69+
config.files = tests;
5370
config.concurrency = 2;
5471
config.browsers = [
5572
sauceLabsLauncher({

0 commit comments

Comments
 (0)