Skip to content

Commit

Permalink
chore: fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Angi-Kinas committed Dec 12, 2024
1 parent 4e196fd commit 5684c88
Showing 1 changed file with 20 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing'

import { FormFieldSpatialToggleComponent } from './form-field-spatial-toggle.component';
import { FormFieldSpatialToggleComponent } from './form-field-spatial-toggle.component'
import { MockProvider } from 'ng-mocks'
import { EditorFacade } from '../../../../+state/editor.facade'
import { BehaviorSubject } from 'rxjs'

class EditorFacadeMock {
record$ = new BehaviorSubject([])
}
describe('FormFieldSpatialToggleComponent', () => {
let component: FormFieldSpatialToggleComponent;
let fixture: ComponentFixture<FormFieldSpatialToggleComponent>;
let component: FormFieldSpatialToggleComponent
let fixture: ComponentFixture<FormFieldSpatialToggleComponent>

beforeEach(() => {
TestBed.configureTestingModule({
imports: [FormFieldSpatialToggleComponent]
});
fixture = TestBed.createComponent(FormFieldSpatialToggleComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
imports: [FormFieldSpatialToggleComponent],
providers: [MockProvider(EditorFacade, EditorFacadeMock, 'useClass')],
})
fixture = TestBed.createComponent(FormFieldSpatialToggleComponent)
component = fixture.componentInstance
fixture.detectChanges()
})

it('should create', () => {
expect(component).toBeTruthy();
});
});
expect(component).toBeTruthy()
})
})

0 comments on commit 5684c88

Please sign in to comment.