mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
test: fix
This commit is contained in:
parent
a376268817
commit
8e50702009
3 changed files with 9 additions and 3 deletions
|
|
@ -209,7 +209,7 @@
|
|||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"polyfills": ["zone.js", "zone.js/testing", "src/polyfills.ts"],
|
||||
"tsConfig": "src/tsconfig.spec.json",
|
||||
"preserveSymlinks": true,
|
||||
"karmaConfig": "src/karma.conf.js",
|
||||
|
|
|
|||
|
|
@ -150,6 +150,11 @@ describe('ProjectService', () => {
|
|||
store.overrideSelector(selectNoteFeatureState, initialNoteState);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
// Reset selector mocks to prevent interference with other test files
|
||||
store.resetSelectors();
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js';
|
||||
import 'zone.js/testing';
|
||||
// NOTE: Do NOT import 'zone.js' or 'zone.js/testing' here explicitly.
|
||||
// Angular's karma builder handles Zone.js setup automatically.
|
||||
// Adding explicit imports causes conflicts with Jasmine's clock mocking.
|
||||
import { getTestBed, TestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue