mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-07-13 15:28:32 +08:00
adding basic jest tests
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { square } from '.';
|
||||
|
||||
describe('square', () => {
|
||||
beforeEach(() => {
|
||||
console.log('this happens before each test');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
console.log('this happens after each test');
|
||||
});
|
||||
|
||||
it('should be able to give the square of two numbers', () => {
|
||||
console.log('test');
|
||||
expect(square(5)).toBe(25);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user