36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
import { EnterRecipeData } from './enter-recipe-data';
|
|
import { provideQueryClient, QueryClient } from '@tanstack/angular-query-experimental';
|
|
import { inputBinding } from '@angular/core';
|
|
import { RecipeDraftViewModel } from '../../../../shared/models/RecipeDraftView.model';
|
|
|
|
describe('EnterRecipeData', () => {
|
|
let component: EnterRecipeData;
|
|
let fixture: ComponentFixture<EnterRecipeData>;
|
|
|
|
beforeEach(async () => {
|
|
const queryClient = new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
retry: false,
|
|
},
|
|
},
|
|
});
|
|
|
|
await TestBed.configureTestingModule({
|
|
imports: [EnterRecipeData],
|
|
providers: [provideQueryClient(queryClient)],
|
|
}).compileComponents();
|
|
|
|
fixture = TestBed.createComponent(EnterRecipeData, {
|
|
bindings: [inputBinding('draft', () => ({}) as RecipeDraftViewModel)],
|
|
});
|
|
component = fixture.componentInstance;
|
|
await fixture.whenStable();
|
|
});
|
|
|
|
it('should create', () => {
|
|
expect(component).toBeTruthy();
|
|
});
|
|
});
|