fix(electron): preserve HMR connection limits
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
|
||||
import { resolveStartupUrlProbePlan } from './startup-url-selection.mjs';
|
||||
import { resolveStartupUrlProbePlan, shouldIgnoreLoopbackConnectionLimit } from './startup-url-selection.mjs';
|
||||
|
||||
test('bundled development never probes HMR endpoints', () => {
|
||||
assert.deepEqual(resolveStartupUrlProbePlan({
|
||||
@@ -46,3 +46,9 @@ test('production does not probe HMR endpoints', () => {
|
||||
probeHmrUi: false,
|
||||
});
|
||||
});
|
||||
|
||||
test('keeps Chromium connection limits for the Vite HMR module graph', () => {
|
||||
assert.equal(shouldIgnoreLoopbackConnectionLimit({ development: true, packagedUi: false }), false);
|
||||
assert.equal(shouldIgnoreLoopbackConnectionLimit({ development: true, packagedUi: true }), true);
|
||||
assert.equal(shouldIgnoreLoopbackConnectionLimit({ development: false, packagedUi: false }), true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user