refactor: properly report on skipped native modules tests (#13894)
This commit is contained in:
parent
4cf264f87a
commit
c452be02b9
3 changed files with 5 additions and 14 deletions
|
@ -1697,10 +1697,8 @@ describe('BrowserWindow module', () => {
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
w.loadURL(`file://${path.join(fixtures, 'api', 'native-window-open-iframe.html')}`)
|
w.loadURL(`file://${path.join(fixtures, 'api', 'native-window-open-iframe.html')}`)
|
||||||
})
|
});
|
||||||
it('loads native addons correctly after reload', (done) => {
|
(nativeModulesEnabled ? it : it.skip)('loads native addons correctly after reload', (done) => {
|
||||||
if (!nativeModulesEnabled) return done()
|
|
||||||
|
|
||||||
ipcMain.once('answer', (event, content) => {
|
ipcMain.once('answer', (event, content) => {
|
||||||
assert.equal(content, 'function')
|
assert.equal(content, 'function')
|
||||||
ipcMain.once('answer', (event, content) => {
|
ipcMain.once('answer', (event, content) => {
|
||||||
|
|
|
@ -11,9 +11,7 @@ describe('modules support', () => {
|
||||||
const fixtures = path.join(__dirname, 'fixtures')
|
const fixtures = path.join(__dirname, 'fixtures')
|
||||||
|
|
||||||
describe('third-party module', () => {
|
describe('third-party module', () => {
|
||||||
describe('runas', () => {
|
(nativeModulesEnabled ? describe : describe.skip)('runas', () => {
|
||||||
if (!nativeModulesEnabled) return
|
|
||||||
|
|
||||||
it('can be required in renderer', () => {
|
it('can be required in renderer', () => {
|
||||||
require('runas')
|
require('runas')
|
||||||
})
|
})
|
||||||
|
|
|
@ -204,14 +204,9 @@ describe('<webview> tag', function () {
|
||||||
allowpopups: 'on',
|
allowpopups: 'on',
|
||||||
src
|
src
|
||||||
})
|
})
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads native modules when navigation happens', async function () {
|
|
||||||
if (!nativeModulesEnabled) {
|
|
||||||
this.skip()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
|
(nativeModulesEnabled ? it : it.skip)('loads native modules when navigation happens', async function () {
|
||||||
await loadWebView(webview, {
|
await loadWebView(webview, {
|
||||||
nodeintegration: 'on',
|
nodeintegration: 'on',
|
||||||
src: `file://${fixtures}/pages/native-module.html`
|
src: `file://${fixtures}/pages/native-module.html`
|
||||||
|
|
Loading…
Add table
Reference in a new issue