test: add more logging for a few tests. (#27956)
* test: add logging for app.relaunch test * test: compare more fields in extension test
This commit is contained in:
parent
d1145a0f2b
commit
ed8e57e424
2 changed files with 12 additions and 5 deletions
|
@ -286,13 +286,20 @@ describe('app module', () => {
|
||||||
} else if (String(data) === 'true' && state === 'first-launch') {
|
} else if (String(data) === 'true' && state === 'first-launch') {
|
||||||
done();
|
done();
|
||||||
} else {
|
} else {
|
||||||
done(`Unexpected state: ${state}`);
|
done(`Unexpected state: "${state}", data: "${data}"`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const appPath = path.join(fixturesPath, 'api', 'relaunch');
|
const appPath = path.join(fixturesPath, 'api', 'relaunch');
|
||||||
cp.spawn(process.execPath, [appPath]);
|
const child = cp.spawn(process.execPath, [appPath]);
|
||||||
|
child.stdout.on('data', (c) => console.log(c.toString()));
|
||||||
|
child.stderr.on('data', (c) => console.log(c.toString()));
|
||||||
|
child.on('exit', (code) => {
|
||||||
|
if (code !== 0) {
|
||||||
|
done(`Process exited with code ${code}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -152,13 +152,13 @@ describe('chrome extensions', () => {
|
||||||
const [, loadedExtension] = await loadedPromise;
|
const [, loadedExtension] = await loadedPromise;
|
||||||
const [, readyExtension] = await emittedOnce(customSession, 'extension-ready');
|
const [, readyExtension] = await emittedOnce(customSession, 'extension-ready');
|
||||||
|
|
||||||
expect(loadedExtension.id).to.equal(extension.id);
|
expect(loadedExtension).to.deep.equal(extension);
|
||||||
expect(readyExtension.id).to.equal(extension.id);
|
expect(readyExtension).to.deep.equal(extension);
|
||||||
|
|
||||||
const unloadedPromise = emittedOnce(customSession, 'extension-unloaded');
|
const unloadedPromise = emittedOnce(customSession, 'extension-unloaded');
|
||||||
await customSession.removeExtension(extension.id);
|
await customSession.removeExtension(extension.id);
|
||||||
const [, unloadedExtension] = await unloadedPromise;
|
const [, unloadedExtension] = await unloadedPromise;
|
||||||
expect(unloadedExtension.id).to.equal(extension.id);
|
expect(unloadedExtension).to.deep.equal(extension);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('lists loaded extensions in getAllExtensions', async () => {
|
it('lists loaded extensions in getAllExtensions', async () => {
|
||||||
|
|
Loading…
Reference in a new issue