test: fix failing http spec (#27525)

This commit is contained in:
Shelley Vohr 2021-01-28 11:51:08 -08:00 committed by GitHub
parent 0bb1ba822a
commit 18f4c3129d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -277,12 +277,12 @@ describe('chrome extensions', () => {
it('can cancel http requests', async () => {
await w.loadURL(url);
await customSession.loadExtension(path.join(fixtures, 'extensions', 'chrome-webRequest'));
await expect(fetch(w.webContents, url)).to.eventually.be.rejectedWith(TypeError);
await expect(fetch(w.webContents, url)).to.eventually.be.rejectedWith('Failed to fetch');
});
it('does not cancel http requests when no extension loaded', async () => {
await w.loadURL(url);
await expect(fetch(w.webContents, url)).to.not.be.rejectedWith(TypeError);
await expect(fetch(w.webContents, url)).to.not.be.rejectedWith('Failed to fetch');
});
});