Skip to content

Commit 44d396c

Browse files
committed
Fix: Add async ODataClient initialization in tests
1 parent d841613 commit 44d396c

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

projects/angular-odata/src/lib/client.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { QueryOption } from './types';
3131
import { provideZonelessChangeDetection } from '@angular/core';
3232

3333
describe('ODataClient', () => {
34-
beforeEach(() => {
34+
beforeEach(async () => {
3535
TestBed.configureTestingModule({
3636
providers: [
3737
provideZonelessChangeDetection(),
@@ -40,6 +40,7 @@ describe('ODataClient', () => {
4040
provideHttpClientTesting(),
4141
],
4242
});
43+
await TestBed.inject(ODataClient).initialize();
4344
});
4445

4546
afterEach(() => {

projects/angular-odata/src/lib/resources/resource.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const SERVICE_ROOT = 'https://services.odata.org/v4/TripPinServiceRW/';
2020
const ENTITY_SET = 'People';
2121

2222
describe('ODataResource', () => {
23-
beforeEach(() => {
23+
beforeEach(async () => {
2424
TestBed.configureTestingModule({
2525
providers: [
2626
provideZonelessChangeDetection(),
@@ -33,6 +33,7 @@ describe('ODataResource', () => {
3333
provideHttpClientTesting(),
3434
],
3535
});
36+
await TestBed.inject(ODataClient).initialize();
3637
});
3738

3839
it('should create batch resource', () => {

0 commit comments

Comments
 (0)