test: run visibility-state-spec.ts first (#44206)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
This commit is contained in:
parent
566c72cd46
commit
48156aee06
2 changed files with 11 additions and 10 deletions
|
@ -149,7 +149,17 @@ app.whenReady().then(async () => {
|
|||
|
||||
const { getFiles } = require('./get-files');
|
||||
const testFiles = await getFiles(__dirname, filter);
|
||||
for (const file of testFiles.sort()) {
|
||||
const VISIBILITY_SPEC = ('visibility-state-spec.ts');
|
||||
const sortedFiles = testFiles.sort((a, b) => {
|
||||
// If visibility-state-spec is in the list, move it to the first position
|
||||
// so that it gets executed first to avoid other specs interferring with it.
|
||||
if (a.indexOf(VISIBILITY_SPEC) > -1) {
|
||||
return -1;
|
||||
} else {
|
||||
return a.localeCompare(b);
|
||||
}
|
||||
});
|
||||
for (const file of sortedFiles) {
|
||||
mocha.addFile(file);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue