Compare commits

...

1 Commits

Author SHA1 Message Date
Shelley Vohr
047b8be057 spec: try closing windows more aggressively in transparent specs 2024-03-14 09:56:55 +01:00
2 changed files with 8 additions and 4 deletions

View File

@@ -6427,7 +6427,9 @@ describe('BrowserWindow module', () => {
});
describe('"transparent" option', () => {
afterEach(closeAllWindows);
afterEach(() => {
closeAllWindows({ assertNotWindows: true });
});
ifit(process.platform !== 'linux')('correctly returns isMaximized() when the window is maximized then minimized', async () => {
const w = new BrowserWindow({
@@ -6571,7 +6573,9 @@ describe('BrowserWindow module', () => {
});
describe('"backgroundColor" option', () => {
afterEach(closeAllWindows);
afterEach(() => {
closeAllWindows({ assertNotWindows: true });
});
// Linux/WOA doesn't return any capture sources.
ifit(process.platform === 'darwin')('should display the set color', async () => {

View File

@@ -46,8 +46,8 @@ export const closeWindow = async (
}
};
export async function closeAllWindows () {
export async function closeAllWindows (options = { assertNotWindows: false }) {
for (const w of BaseWindow.getAllWindows()) {
await closeWindow(w, { assertNotWindows: false });
await closeWindow(w, options);
}
}