Skip to content

Commit

Permalink
correction des TU
Browse files Browse the repository at this point in the history
  • Loading branch information
abarhub committed Jun 19, 2022
1 parent b3e4eb4 commit 7755127
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
9 changes: 7 additions & 2 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
import {Store, StoreModule} from '@ngrx/store';

describe('AppComponent', () => {
let store: Store;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
RouterTestingModule
RouterTestingModule,
StoreModule.forRoot({})
],
declarations: [
AppComponent
],
}).compileComponents();
store = TestBed.inject(Store);
});

it('should create the app', () => {
Expand All @@ -30,6 +35,6 @@ describe('AppComponent', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('tictactoejs app is running!');
expect(compiled.querySelector('h1').textContent).toContain('Tic Tac Toe');
});
});
6 changes: 5 additions & 1 deletion src/app/game-state/game-state.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { GameStateComponent } from './game-state.component';
import {Store, StoreModule} from '@ngrx/store';

describe('GameStateComponent', () => {
let component: GameStateComponent;
let fixture: ComponentFixture<GameStateComponent>;
let store: Store;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ GameStateComponent ]
declarations: [ GameStateComponent ],
imports: [StoreModule.forRoot({})]
})
.compileComponents();
store = TestBed.inject(Store);
});

beforeEach(() => {
Expand Down
6 changes: 5 additions & 1 deletion src/app/grid/grid.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { GridComponent } from './grid.component';
import {Store, StoreModule} from '@ngrx/store';

describe('GridComponent', () => {
let component: GridComponent;
let fixture: ComponentFixture<GridComponent>;
let store: Store;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ GridComponent ]
declarations: [ GridComponent ],
imports: [StoreModule.forRoot({})]
})
.compileComponents();
store = TestBed.inject(Store);
});

beforeEach(() => {
Expand Down
15 changes: 11 additions & 4 deletions src/app/theme-manager/theme-manager.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import {ComponentFixture, TestBed} from '@angular/core/testing';

import { ThemeManagerComponent } from './theme-manager.component';
import {ThemeManagerComponent} from './theme-manager.component';
import {Store, StoreModule} from '@ngrx/store';
import {FormsModule, ReactiveFormsModule, UntypedFormBuilder} from '@angular/forms';

describe('ThemeManagerComponent', () => {
let component: ThemeManagerComponent;
let fixture: ComponentFixture<ThemeManagerComponent>;
let store: Store;
let untypedFormBuilder: UntypedFormBuilder;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ThemeManagerComponent ]
declarations: [ThemeManagerComponent],
imports: [StoreModule.forRoot({}), ReactiveFormsModule]
})
.compileComponents();
.compileComponents();
store = TestBed.inject(Store);
untypedFormBuilder = TestBed.inject(UntypedFormBuilder);
});

beforeEach(() => {
Expand Down

0 comments on commit 7755127

Please sign in to comment.