test: disable shell.trashItem in renderer test on win-ia32 (#28868)
This commit is contained in:
parent
cdf04f3ae7
commit
aedec5206c
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ import { BrowserWindow, app } from 'electron/main';
|
||||||
import { shell } from 'electron/common';
|
import { shell } from 'electron/common';
|
||||||
import { closeAllWindows } from './window-helpers';
|
import { closeAllWindows } from './window-helpers';
|
||||||
import { emittedOnce } from './events-helpers';
|
import { emittedOnce } from './events-helpers';
|
||||||
|
import { ifit } from './spec-helpers';
|
||||||
import * as http from 'http';
|
import * as http from 'http';
|
||||||
import * as fs from 'fs-extra';
|
import * as fs from 'fs-extra';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
@ -77,7 +78,7 @@ describe('shell module', () => {
|
||||||
await expect(shell.trashItem(filename)).to.eventually.be.rejected();
|
await expect(shell.trashItem(filename)).to.eventually.be.rejected();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('works in the renderer process', async () => {
|
ifit(!(process.platform === 'win32' && process.arch === 'ia32'))('works in the renderer process', async () => {
|
||||||
const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false } });
|
const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false } });
|
||||||
w.loadURL('about:blank');
|
w.loadURL('about:blank');
|
||||||
await expect(w.webContents.executeJavaScript('require(\'electron\').shell.trashItem(\'does-not-exist\')')).to.be.rejectedWith(/does-not-exist|Failed to move item|Failed to create FileOperation/);
|
await expect(w.webContents.executeJavaScript('require(\'electron\').shell.trashItem(\'does-not-exist\')')).to.be.rejectedWith(/does-not-exist|Failed to move item|Failed to create FileOperation/);
|
||||||
|
|
Loading…
Reference in a new issue