-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4c1a3c
commit 8697583
Showing
17 changed files
with
135 additions
and
63 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.idea/ | ||
coverage/ | ||
node_modules/ | ||
lib/ | ||
temp | ||
yarn.lock | ||
*.log | ||
|
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 |
---|---|---|
@@ -1,7 +1,3 @@ | ||
const {resolve} = require('path'); | ||
const preset = require('./lib').default; | ||
|
||
module.exports = { | ||
globalSetup: resolve(__dirname, './setup.js'), | ||
globalTeardown: resolve(__dirname, './teardown.js'), | ||
testEnvironment: resolve(__dirname, './environment.js'), | ||
}; | ||
module.exports = preset; |
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 |
---|---|---|
|
@@ -17,21 +17,32 @@ | |
"email": "[email protected]", | ||
"url": "shelf.io" | ||
}, | ||
"files": [ | ||
"jest-preset.js", | ||
"lib/" | ||
], | ||
"scripts": { | ||
"lint": "eslint . --fix --ext .js,.json,.ts --quiet", | ||
"build": "rm -rf lib/ && yarn build:types && babel src --out-dir lib --ignore '**/*.test.ts' --extensions '.ts'", | ||
"build:types": "tsc --emitDeclarationOnly --declaration --isolatedModules false --declarationDir lib", | ||
"lint": "eslint . --ext .js,.ts,.json --fix", | ||
"lint:ci": "eslint . --ext .js,.ts,.json", | ||
"prepack": "yarn build", | ||
"test": "jest", | ||
"test:repl": "MONGO_MEMORY_SERVER_FILE=jest-mongodb-config-repl.js jest" | ||
"test:repl": "MONGO_MEMORY_SERVER_FILE=jest-mongodb-config-repl.js jest", | ||
"type-check": "tsc --noEmit", | ||
"type-check:watch": "npm run type-check -- --watch" | ||
}, | ||
"lint-staged": { | ||
"*.{html,md,yml}": [ | ||
"prettier --write", | ||
"git add" | ||
"prettier --write" | ||
], | ||
"*.{js,json}": [ | ||
"eslint --fix", | ||
"git add" | ||
"*.{ts,js,json}": [ | ||
"eslint --fix" | ||
] | ||
}, | ||
"babel": { | ||
"extends": "@shelf/babel-config/backend" | ||
}, | ||
"prettier": "@shelf/prettier-config", | ||
"jest": { | ||
"preset": "./jest-preset.js" | ||
|
@@ -42,8 +53,14 @@ | |
"uuid": "8.3.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "7.18.10", | ||
"@babel/core": "7.18.10", | ||
"@shelf/babel-config": "1.2.0", | ||
"@shelf/eslint-config": "2.18.0", | ||
"@shelf/prettier-config": "1.0.0", | ||
"@shelf/tsconfig": "0.0.8", | ||
"@types/jest": "28.1.6", | ||
"@types/node": "16", | ||
"eslint": "8.22.0", | ||
"husky": "8.0.1", | ||
"jest": "28.1.3", | ||
|
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
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
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,9 @@ | ||
import {resolve} from 'path'; | ||
|
||
export * from './types'; | ||
|
||
export default { | ||
globalSetup: resolve(__dirname, './setup.js'), | ||
globalTeardown: resolve(__dirname, './teardown.js'), | ||
testEnvironment: resolve(__dirname, './environment.js'), | ||
}; |
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
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
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,10 @@ | ||
/* eslint-disable */ | ||
import { MongoMemoryReplSet, MongoMemoryServer } from "mongodb-memory-server"; | ||
|
||
declare global { | ||
var __MONGOD__: Mongo; | ||
var __MONGO_URI__: string; | ||
var __MONGO_DB_NAME__: string | ||
} | ||
|
||
export type Mongo = (MongoMemoryReplSet | MongoMemoryServer) & {isRunning: boolean} |
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
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
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
12 changes: 8 additions & 4 deletions
12
mongo-parallelism2.test.js → test/mongo-parallelism2.test.ts
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
12 changes: 8 additions & 4 deletions
12
mongo-parallelism3.test.js → test/mongo-parallelism3.test.ts
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
Oops, something went wrong.