* init * get unit test working for course.ts file * added some other tests * tests halfway + change config to accomodate js files * utility functions tests done * fix: config file + miscellaneous fixes * fix: prepare script * fix lock file --------- Co-authored-by: Rotimi Best <best@classroomio.com>
19 lines
481 B
TypeScript
19 lines
481 B
TypeScript
import { isCourseFree } from './course';
|
|
|
|
describe('course.ts', () => {
|
|
test('Should return True when cost is 0', () => {
|
|
const result = isCourseFree(0);
|
|
expect(result).toBeTruthy();
|
|
});
|
|
|
|
test('Should return true when cost is negative', () => {
|
|
const result = isCourseFree(-10);
|
|
expect(result).toBeTruthy();
|
|
});
|
|
|
|
test('Should return True when cost is Not A Number', () => {
|
|
const result = isCourseFree(NaN);
|
|
expect(result).toBeTruthy();
|
|
});
|
|
});
|