forked from PluralFlux/PluralFlux
feat: Add unit tests (#21)
Tests are mostly complete (though some are failing -- to be fixed in the async/await refactor. Also refactored, fixed bugs found while testing, and added ability to type `pf;m` instead of `pf;member`. --------- Co-authored-by: Aster Fialla <asterfialla@gmail.com>
This commit is contained in:
19
tests/helpers/utils.test.js
Normal file
19
tests/helpers/utils.test.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const {enums} = require("../../src/enums");
|
||||
|
||||
const fetchMock = require('jest-fetch-mock');
|
||||
fetchMock.enableMocks();
|
||||
|
||||
const {utils} = require("../../src/helpers/utils.js");
|
||||
|
||||
describe('utils', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetModules();
|
||||
jest.clearAllMocks();
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
// restore the spy created with spyOn
|
||||
jest.restoreAllMocks();
|
||||
});
|
||||
})
|
||||
Reference in New Issue
Block a user