test: refactor crashReporter tests (#23178)
This commit is contained in:
parent
375b793984
commit
6fa05dd123
19 changed files with 451 additions and 548 deletions
|
@ -90,7 +90,7 @@ app.whenReady().then(() => {
|
|||
|
||||
walker.on('end', () => {
|
||||
testFiles.sort();
|
||||
sortToEnd(testFiles, f => f.includes('crash-reporter')).forEach((file) => {
|
||||
testFiles.forEach((file) => {
|
||||
if (!argv.files || argv.files.includes(path.relative(baseElectronDir, file))) {
|
||||
mocha.addFile(file);
|
||||
}
|
||||
|
@ -117,8 +117,3 @@ function partition (xs, f) {
|
|||
xs.forEach(x => (f(x) ? trues : falses).push(x));
|
||||
return [trues, falses];
|
||||
}
|
||||
|
||||
function sortToEnd (xs, f) {
|
||||
const [end, beginning] = partition(xs, f);
|
||||
return beginning.concat(end);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue