-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- set testing in place, fixing minor bugs
- Loading branch information
Showing
8 changed files
with
5,260 additions
and
5,626 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import challenges, { defaultWeek } from "../../utils/challenges"; | ||
|
||
test("should return week 1 data", () => { | ||
const week = challenges({ week: 1 }); | ||
expect(week.getChallenges().length).not.toBe(0); | ||
}); | ||
|
||
test("should return week 2 data", () => { | ||
const week = challenges({ week: 2 }); | ||
expect(week.getChallenges().length).not.toBe(0); | ||
}); | ||
|
||
test("should return week 3 data", () => { | ||
const week = challenges({ week: 3 }); | ||
expect(week.getChallenges().length).not.toBe(0); | ||
}); | ||
|
||
test("should return week 4 data", () => { | ||
const week = challenges({ week: 4 }); | ||
expect(week.getChallenges().length).not.toBe(0); | ||
}); | ||
|
||
test("should return week 5 data", () => { | ||
const week = challenges({ week: 5 }); | ||
expect(week.getChallenges().length).not.toBe(0); | ||
}); | ||
|
||
test("should return week 6 data", () => { | ||
const week = challenges({ week: 6 }); | ||
expect(week.getChallenges().length).not.toBe(0); | ||
}); | ||
|
||
test("should return empty week", () => { | ||
expect(challenges().getChallenges().length).toBe(0); | ||
expect(challenges({}).getChallenges().length).toBe(0); | ||
expect(challenges({ week: "x" }).getChallenges().length).toBe(0); | ||
}); | ||
|
||
test("should return a default week", () => { | ||
expect(defaultWeek).toBeDefined(); | ||
expect(typeof defaultWeek).toBe("number"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
setupFiles: ['<rootDir>/jest.setup.js'], | ||
testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { configure } from 'enzyme' | ||
import Adapter from 'enzyme-adapter-react-16' | ||
|
||
configure({ adapter: new Adapter() }) |
Oops, something went wrong.