fix: assert.ok
in the renderer process (#46528)
fix: assert.ok in the renderer process
This commit is contained in:
parent
b1731407bc
commit
1a6de10da8
4 changed files with 15 additions and 18 deletions
|
@ -983,6 +983,17 @@ describe('node feature', () => {
|
|||
});
|
||||
});
|
||||
|
||||
itremote('handles assert module assertions as expected', () => {
|
||||
const assert = require('node:assert');
|
||||
try {
|
||||
assert.ok(false);
|
||||
expect.fail('assert.ok(false) should throw');
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
expect(err).to.be.instanceOf(assert.AssertionError);
|
||||
}
|
||||
});
|
||||
|
||||
it('Can find a module using a package.json main field', () => {
|
||||
const result = childProcess.spawnSync(process.execPath, [path.resolve(fixtures, 'api', 'electron-main-module', 'app.asar')], { stdio: 'inherit' });
|
||||
expect(result.status).to.equal(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue