Skip to content

Commit

Permalink
feat: manually set new mongo db server per test setup
Browse files Browse the repository at this point in the history
instead of relying on @shelf/mongodb
  • Loading branch information
karrui committed Dec 3, 2020
1 parent 34ebcaa commit e3a5b11
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 369 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ tmp/
# =======
.localstack

# @shelf/jest-mongodb generated file
# =======
globalConfig.json

# Tests
# =======
coverage/
11 changes: 0 additions & 11 deletions jest-mongodb-config.js

This file was deleted.

10 changes: 2 additions & 8 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
const { defaults: tsJestPreset } = require('ts-jest/presets')

module.exports = {
preset: '@shelf/jest-mongodb',
preset: 'ts-jest',
testMatch: ['**/?(*.)+(spec|test).[t]s?(x)'],
modulePaths: ['<rootDir>'],
testEnvironment: '<rootDir>/tests/environment.js',
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/node_modules/'],
transform: {
// Needed to use @shelf/jest-mongodb preset.
...tsJestPreset.transform,
},
collectCoverageFrom: ['./src/**/*.{ts,js}', '!**/__tests__/**'],
coveragePathIgnorePatterns: ['./node_modules/', './tests'],
coverageReporters: ['lcov', 'text'],
Expand All @@ -17,5 +12,4 @@ module.exports = {
statements: 38, // Increase this percentage as test coverage improves
},
},
testEnvironment: 'node',
}

0 comments on commit e3a5b11

Please sign in to comment.