mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
test: skip 'handles Promise timeouts correctly' when ELECTRON_RUN_AS_NODE is disabled (#23949) (#24165)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ const { ipcRenderer, remote } = require('electron');
|
||||
const features = process.electronBinding('features');
|
||||
|
||||
const { emittedOnce } = require('./events-helpers');
|
||||
const { ifit } = require('./spec-helpers');
|
||||
|
||||
const isCI = remote.getGlobal('isCi');
|
||||
chai.use(dirtyChai);
|
||||
@@ -691,7 +692,7 @@ describe('node feature', () => {
|
||||
expect(result.status).to.equal(0);
|
||||
});
|
||||
|
||||
it('handles Promise timeouts correctly', (done) => {
|
||||
ifit(features.isRunAsNodeEnabled())('handles Promise timeouts correctly', (done) => {
|
||||
const scriptPath = path.join(fixtures, 'module', 'node-promise-timer.js');
|
||||
const child = ChildProcess.spawn(process.execPath, [scriptPath], {
|
||||
env: { ELECTRON_RUN_AS_NODE: 'true' }
|
||||
|
||||
2
spec/spec-helpers.js
Normal file
2
spec/spec-helpers.js
Normal file
@@ -0,0 +1,2 @@
|
||||
exports.ifit = (condition) => (condition ? it : it.skip);
|
||||
exports.ifdescribe = (condition) => (condition ? describe : describe.skip);
|
||||
Reference in New Issue
Block a user