chore: restore original directory structure (project under code-review-graph-main/)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { describe, it, test, expect, beforeEach } from 'bun:test';
|
||||
import { UserRepository, UserService } from './sample_typescript';
|
||||
|
||||
describe('UserService (bun)', () => {
|
||||
let repo: UserRepository;
|
||||
|
||||
beforeEach(() => {
|
||||
repo = new UserRepository();
|
||||
});
|
||||
|
||||
it('constructs a service with a repository', () => {
|
||||
const service = new UserService();
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
|
||||
it('finds a user by id', () => {
|
||||
const service = new UserService();
|
||||
const user = service.getUser(123);
|
||||
expect(user).toBeUndefined();
|
||||
});
|
||||
|
||||
test('creates a user via the service', () => {
|
||||
const service = new UserService();
|
||||
const created = service.createUser('alice', '[email protected]');
|
||||
expect(created.name).toBe('alice');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user