Skip to content

Commit

Permalink
fix(tsconfig): interference between types Jasmine and Chai
Browse files Browse the repository at this point in the history
- fix test inject HttpClientTestingModule
  • Loading branch information
alecarn committed Sep 19, 2023
1 parent 8e7efb3 commit f09b0e7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 3 additions & 2 deletions e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"extends": "../tsconfig.json",
"include": ["**/*.ts"],
"compilerOptions": {
"sourceMap": false,
"types": ["cypress"]
}
},
"include": ["**/*.ts"],
"exclude": []
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { TestBed } from '@angular/core/testing';

import { WelcomeWindowService } from './welcome-window.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';

describe('WelcomeWindowService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
beforeEach(() =>
TestBed.configureTestingModule({
imports: [HttpClientTestingModule]
})
);

it('should be created', () => {
const service: WelcomeWindowService = TestBed.inject(WelcomeWindowService);
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"experimentalDecorators": true,
"skipLibCheck": true,
"sourceMap": true
}
},
"exclude": ["dist", "scripts", "e2e/**/*"]
}

0 comments on commit f09b0e7

Please sign in to comment.