Skip to content

Commit

Permalink
feat: add more test and replace jest with mocha
Browse files Browse the repository at this point in the history
  • Loading branch information
davojta committed Aug 28, 2019
1 parent a1018eb commit 160b152
Show file tree
Hide file tree
Showing 4 changed files with 721 additions and 3,947 deletions.
32 changes: 27 additions & 5 deletions index.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var { expect } = require('chai')

const getTimeForEducation = require('./src/index')

const defaultStudentSpeedConfig = {
Expand All @@ -11,16 +13,36 @@ const defaultStudentSpeedConfig = {


describe('js-edu', () => {
describe('for general student', () => {
describe('for general student with programming skills', () => {
it('should could take 200 weeks for family focus', () => {
const days = getTimeForEducation('family', true, defaultStudentSpeedConfig);
const weeks = getTimeForEducation('family', true, defaultStudentSpeedConfig);

expect(weeks).to.equal(200);
});
it('should could take 80 weeks for friends focus', () => {
const weeks = getTimeForEducation('friends', true, defaultStudentSpeedConfig);

expect(weeks).to.equal(80);
});
it('should could take 40 weeks for normal_life focus', () => {
const weeks = getTimeForEducation('normal_life', true, defaultStudentSpeedConfig);

expect(weeks).to.equal(40);
});
it('should could take 27 weeks for profession focus', () => {
const weeks = getTimeForEducation('profession', true, defaultStudentSpeedConfig);

expect(weeks).to.equal(27);
});
it('should could take 20 weeks for carrier focus', () => {
const weeks = getTimeForEducation('carrier', true, defaultStudentSpeedConfig);

expect(days).toBe(200);
expect(weeks).to.equal(20);
});
it('should could take 14 weeks for top_peformance focus', () => {
const days = getTimeForEducation('top_peformance', true, defaultStudentSpeedConfig);
const weeks = getTimeForEducation('top_peformance', true, defaultStudentSpeedConfig);

expect(days).toBe(14);
expect(weeks).to.equal(14);
});
})
});
Loading

0 comments on commit 160b152

Please sign in to comment.