Skip to content

Commit

Permalink
#17 Config jest-mongodb
Browse files Browse the repository at this point in the history
  • Loading branch information
blms committed Jul 27, 2020
1 parent cb36c86 commit 7fbc9a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Jest
globalConfig.json
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
preset: '@shelf/jest-mongodb',
setupFilesAfterEnv: ['<rootDir>/src/setupTests.js'],
testPathIgnorePatterns: ['/node_modules/', '/.next/'],
watchPathIgnorePatterns: ['<rootDir>/globalConfig.json'],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
Expand Down
6 changes: 0 additions & 6 deletions src/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@

import '@testing-library/jest-dom/extend-expect';

import fs from 'fs';
import fetchMock from 'jest-fetch-mock';

fetchMock.enableMocks();

afterAll(() => {
// Unlink config used in jest-mongodb
fs.unlink(`${process.cwd()}/globalConfig.json`, () => {});
});

0 comments on commit 7fbc9a1

Please sign in to comment.