Compare commits

...

5 Commits

Author SHA1 Message Date
Charles Kerr
35369cb59c fix: @mocha/no-nested-tests warnings in api-browser-window-spec.ts 2025-05-02 09:19:56 -05:00
Charles Kerr
1e9cbc555c refactor: use this.skip() instead of it.skip() to avoid @mocha/no-nested-tests warning 2025-05-02 09:19:56 -05:00
Charles Kerr
675ae83d8a build: enable the mocha/no-nested-tests eslint rule 2025-05-02 09:19:56 -05:00
Charles Kerr
b71300270e fix: nested it() calls in visibleOnAllWorkspaces specs 2025-05-02 09:19:13 -05:00
Charles Kerr
8949f35854 test: do not skip visibleOnAllWorkspaces tests on Windows
That feature is supported on Linux, so move the test from the
"window states (excluding Linux)" section into the
"window states" section.
2025-05-02 09:19:13 -05:00
3 changed files with 10 additions and 9 deletions

View File

@@ -16,6 +16,7 @@
],
"rules": {
"mocha/no-exclusive-tests": "error",
"mocha/no-nested-tests": "error",
"unicorn/prefer-node-protocol": "error"
}
}

View File

@@ -5226,7 +5226,7 @@ describe('BrowserWindow module', () => {
});
describe('resizable state', () => {
it('with properties', () => {
describe('with properties', () => {
it('can be set with resizable constructor option', () => {
const w = new BrowserWindow({ show: false, resizable: false });
expect(w.resizable).to.be.false('resizable');
@@ -5246,7 +5246,7 @@ describe('BrowserWindow module', () => {
});
});
it('with functions', () => {
describe('with functions', () => {
it('can be set with resizable constructor option', () => {
const w = new BrowserWindow({ show: false, resizable: false });
expect(w.isResizable()).to.be.false('resizable');
@@ -5525,7 +5525,7 @@ describe('BrowserWindow module', () => {
});
ifdescribe(process.platform === 'darwin')('representedFilename', () => {
it('with properties', () => {
describe('with properties', () => {
it('can be changed', () => {
const w = new BrowserWindow({ show: false });
expect(w.representedFilename).to.eql('');
@@ -5534,7 +5534,7 @@ describe('BrowserWindow module', () => {
});
});
it('with functions', () => {
describe('with functions', () => {
it('can be changed', () => {
const w = new BrowserWindow({ show: false });
expect(w.getRepresentedFilename()).to.eql('');
@@ -5579,7 +5579,7 @@ describe('BrowserWindow module', () => {
});
describe('maximizable state (property)', () => {
it('with properties', () => {
describe('with properties', () => {
it('can be set with maximizable constructor option', () => {
const w = new BrowserWindow({ show: false, maximizable: false });
expect(w.maximizable).to.be.false('maximizable');
@@ -5612,7 +5612,7 @@ describe('BrowserWindow module', () => {
});
});
it('with functions', () => {
describe('with functions', () => {
it('can be set with maximizable constructor option', () => {
const w = new BrowserWindow({ show: false, maximizable: false });
expect(w.isMaximizable()).to.be.false('isMaximizable');

View File

@@ -119,7 +119,7 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
// bots while it is not on my workstation, as expected, with and without
// the --ci parameter.
if (process.platform === 'linux' && sources.length === 0) {
it.skip('desktopCapturer.getSources returned an empty source list');
this?.skip('desktopCapturer.getSources returned an empty source list');
return;
}
@@ -155,7 +155,7 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
// bots while it is not on my workstation, as expected, with and without
// the --ci parameter.
if (process.platform === 'linux' && sources.length === 0) {
it.skip('desktopCapturer.getSources returned an empty source list');
this?.skip('desktopCapturer.getSources returned an empty source list');
return;
}
@@ -225,7 +225,7 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
// the --ci parameter.
if (process.platform === 'linux' && sources.length === 0) {
destroyWindows();
it.skip('desktopCapturer.getSources returned an empty source list');
this?.skip('desktopCapturer.getSources returned an empty source list');
return;
}