Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ntheanh201 committed Dec 15, 2023
1 parent 61586db commit b8a0a0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe("OriginService", () => {
);
expect(req.request.method).toBe("POST");
expect(req.request.params.keys().length).toBe(0);
expect(req.request.body).toEqual(origin);
expect(req.request.body.name).toEqual(origin.name);
req.flush({ response: origin });
await expectAsync(responseP).toBeResolvedTo(origin);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ describe("OriginDetailComponent", () => {
fixture = TestBed.createComponent(OriginDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
service = TestBed.inject(OriginService);
await fixture.whenStable();
});

it("should create", () => {
expect(component).toBeTruthy();
expect(paramMap).toHaveBeenCalled();
});

it("new origin", async () => {
Expand Down

0 comments on commit b8a0a0f

Please sign in to comment.