Skip to content

Commit

Permalink
test: 🧪 pass error test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhumeisongsong committed Nov 18, 2024
1 parent f83ce05 commit ea21004
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libs/users/application/src/lib/users.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ describe('UsersService', () => {
});

it('should return a user by id', () => {
const user: User = service.findById('1');
const user: User | undefined = service.findById('1');
expect(user).toEqual({ id: '1', name: 'John Doe' });
});

it('should return undefined if user is not found', () => {
const user: User = service.findById('3');
const user: User | undefined = service.findById('3');
expect(user).toBeUndefined();
});
});
5 changes: 3 additions & 2 deletions libs/users/presentation/src/lib/users.resolver.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Test, TestingModule } from '@nestjs/testing';
import { UsersResolver } from './users.resolver';
import { UsersService } from '../../../application/src/lib/users.service';
import { UsersService } from '@users/application';
import { User } from '@user/domain';

import { UsersResolver } from './users.resolver';

describe('UsersResolver', () => {
let resolver: UsersResolver;
let service: UsersService;
Expand Down

0 comments on commit ea21004

Please sign in to comment.