|
@@ -9,6 +9,7 @@ import { setImmediate } from 'node:timers/promises';
|
|
|
|
|
|
const fixturesPath = path.resolve(__dirname, 'fixtures', 'api', 'utility-process');
|
|
|
const isWindowsOnArm = process.platform === 'win32' && process.arch === 'arm64';
|
|
|
+const isWindows32Bit = process.platform === 'win32' && process.arch === 'ia32';
|
|
|
|
|
|
describe('utilityProcess module', () => {
|
|
|
describe('UtilityProcess constructor', () => {
|
|
@@ -57,14 +58,14 @@ describe('utilityProcess module', () => {
|
|
|
expect(code).to.equal(0);
|
|
|
});
|
|
|
|
|
|
- it('emits \'exit\' when child process crashes', async () => {
|
|
|
+ ifit(!isWindows32Bit)('emits \'exit\' when child process crashes', async () => {
|
|
|
const child = utilityProcess.fork(path.join(fixturesPath, 'crash.js'));
|
|
|
// Do not check for exit code in this case,
|
|
|
// SIGSEGV code can be 139 or 11 across our different CI pipeline.
|
|
|
await once(child, 'exit');
|
|
|
});
|
|
|
|
|
|
- it('emits \'exit\' corresponding to the child process', async () => {
|
|
|
+ ifit(!isWindows32Bit)('emits \'exit\' corresponding to the child process', async () => {
|
|
|
const child1 = utilityProcess.fork(path.join(fixturesPath, 'endless.js'));
|
|
|
await once(child1, 'spawn');
|
|
|
const child2 = utilityProcess.fork(path.join(fixturesPath, 'crash.js'));
|
|
@@ -88,7 +89,7 @@ describe('utilityProcess module', () => {
|
|
|
});
|
|
|
|
|
|
describe('app \'child-process-gone\' event', () => {
|
|
|
- it('with default serviceName', async () => {
|
|
|
+ ifit(!isWindows32Bit)('with default serviceName', async () => {
|
|
|
utilityProcess.fork(path.join(fixturesPath, 'crash.js'));
|
|
|
const [, details] = await once(app, 'child-process-gone') as [any, Electron.Details];
|
|
|
expect(details.type).to.equal('Utility');
|
|
@@ -97,7 +98,7 @@ describe('utilityProcess module', () => {
|
|
|
expect(details.reason).to.be.oneOf(['crashed', 'abnormal-exit']);
|
|
|
});
|
|
|
|
|
|
- it('with custom serviceName', async () => {
|
|
|
+ ifit(!isWindows32Bit)('with custom serviceName', async () => {
|
|
|
utilityProcess.fork(path.join(fixturesPath, 'crash.js'), [], { serviceName: 'Hello World!' });
|
|
|
const [, details] = await once(app, 'child-process-gone') as [any, Electron.Details];
|
|
|
expect(details.type).to.equal('Utility');
|