Skip to content

Commit 194c28a

Browse files
committed
fix
1 parent 8bd8501 commit 194c28a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/test.spec.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const compileWithReactRefresh = (
9090
assert(stats, 'stats is not defined');
9191
const statsJson = stats.toJson({ all: true });
9292

93-
if (statsJson.errors.length > 0) {
93+
if (statsJson.errors!.length > 0) {
9494
reject(
9595
new Error(
9696
`Compilation errors:\n${JSON.stringify(statsJson.errors, null, 2)}`,
@@ -99,7 +99,7 @@ const compileWithReactRefresh = (
9999
return;
100100
}
101101

102-
if (statsJson.warnings.length > 0) {
102+
if (statsJson.warnings!.length > 0) {
103103
reject(
104104
new Error(
105105
`Compilation warnings:\n${JSON.stringify(statsJson.warnings, null, 2)}`,
@@ -255,9 +255,7 @@ describe('react-refresh-rspack-plugin', () => {
255255
injectEntry: false,
256256
},
257257
);
258-
expect(reactRefresh).not.toContain(
259-
'RefreshRuntime.injectIntoGlobalHook(safeThis)',
260-
);
258+
expect(reactRefresh).not.toContain('injectIntoGlobalHook(safeThis)');
261259
});
262260

263261
it('should always exclude react-refresh related modules', async () => {

0 commit comments

Comments
 (0)