jest
This commit is contained in:
7
src/consts.test.js
Normal file
7
src/consts.test.js
Normal file
@ -0,0 +1,7 @@
|
||||
import {DIFFICULTY, START_BUTTON_EASY_ID} from './consts';
|
||||
|
||||
describe('getDifficultyById', () => {
|
||||
it('should return correct difficulty', () => {
|
||||
expect(DIFFICULTY[START_BUTTON_EASY_ID]).toBe(10);
|
||||
});
|
||||
});
|
||||
@ -130,7 +130,7 @@ const getExample = () => {
|
||||
|
||||
};
|
||||
|
||||
const getDifficultyById = id => {
|
||||
export const getDifficultyById = id => {
|
||||
return DIFFICULTY[id];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user