fix: EventSource undefined in Renderer/Worker (#44475)

This commit is contained in:
Shelley Vohr 2024-10-31 20:24:44 +01:00 committed by GitHub
parent 8be4ae4bab
commit 15151c6853
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 52 additions and 6 deletions

View file

@ -162,6 +162,15 @@ describe('node feature', () => {
});
});
describe('EventSource', () => {
itremote('works correctly when nodeIntegration is enabled in the renderer', () => {
const es = new EventSource('https://example.com');
expect(es).to.have.property('url').that.is.a('string');
expect(es).to.have.property('readyState').that.is.a('number');
expect(es).to.have.property('withCredentials').that.is.a('boolean');
});
});
describe('fetch', () => {
itremote('works correctly when nodeIntegration is enabled in the renderer', async (fixtures: string) => {
const file = require('node:path').join(fixtures, 'hello.txt');