Skip to content

Commit afb3bfb

Browse files
chore: fix unit tests
1 parent cee6b0f commit afb3bfb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

modules/signals/rxjs-interop/spec/rx-method.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,9 @@ describe('rxMethod', () => {
378378
adder(reactiveValue);
379379

380380
expect(warnSpy).toHaveBeenCalled();
381-
expect(warnSpy.mock.lastCall?.[0]).toMatch(
382-
/outside the injection context/
381+
const warning = (warnSpy.mock.lastCall || []).join(' ');
382+
expect(warning).toMatch(
383+
/reactive method was called outside the injection context with a signal or observable/
383384
);
384385
});
385386

modules/signals/spec/signal-method.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,9 @@ describe('signalMethod', () => {
230230
adder(n);
231231

232232
expect(warnSpy).toHaveBeenCalled();
233-
expect(warnSpy.mock.lastCall?.[0]).toMatch(
234-
/outside the injection context/
233+
const warning = (warnSpy.mock.lastCall || []).join(' ');
234+
expect(warning).toMatch(
235+
/function returned by signalMethod was called outside the injection context with a signal/
235236
);
236237
});
237238

0 commit comments

Comments
 (0)