Skip to content

Commit ea464cb

Browse files
authored
chore(testing): turn the testing folder into a package (#2576)
1 parent b85e152 commit ea464cb

File tree

110 files changed

+264
-141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+264
-141
lines changed

.evergreen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4117,7 +4117,7 @@ functions:
41174117
(cd scripts/docker && docker build --build-arg NODE_JS_VERSION="$NODE_VERSION" -t ubuntu24.04-xvfb -f ubuntu24.04-xvfb.Dockerfile .)
41184118
docker run \
41194119
--rm -v $PWD:/tmp/build ubuntu24.04-xvfb \
4120-
-c 'cd /tmp/build && ./testing/test-vscode.sh'
4120+
-c 'cd /tmp/build && ./scripts/test-vscode.sh'
41214121
}
41224122
test_connectivity:
41234123
- command: expansions.write

.evergreen/evergreen.yml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ functions:
336336
(cd scripts/docker && docker build --build-arg NODE_JS_VERSION="$NODE_VERSION" -t ubuntu24.04-xvfb -f ubuntu24.04-xvfb.Dockerfile .)
337337
docker run \
338338
--rm -v $PWD:/tmp/build ubuntu24.04-xvfb \
339-
-c 'cd /tmp/build && ./testing/test-vscode.sh'
339+
-c 'cd /tmp/build && ./scripts/test-vscode.sh'
340340
}
341341
test_connectivity:
342342
- command: expansions.write

.evergreen/setup-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ OS_ARCH="$(uname "-m")"
55

66
export BASEDIR="$PWD/.evergreen"
77
export PATH="$BASEDIR/node-v$NODE_JS_VERSION-win-x64:/opt/java/jdk17/bin:$PATH"
8-
export MONGOSH_GLOBAL_CONFIG_FILE_FOR_TESTING="$BASEDIR/../../testing/tests-globalconfig.conf"
8+
export MONGOSH_GLOBAL_CONFIG_FILE_FOR_TESTING="$BASEDIR/../packages/testing/tests-globalconfig.conf"
99

1010
export IS_MONGOSH_EVERGREEN_CI=1
1111
export DEBUG="mongodb*,$DEBUG"

.mocharc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"spec": ["testing/dummy.spec.ts"],
3-
"exclude": ["packages/**", "node_modules/**"],
2+
"spec": ["packages/testing/dummy.spec.ts"],
3+
"exclude": ["node_modules/**"],
44
"node-option": ["no-experimental-strip-types=true"]
55
}

.nycrc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
2-
"include": [
3-
"packages/*/src/**",
4-
"scripts/*/src/**",
5-
"configs/*/src/**"
6-
],
2+
"include": ["packages/*/src/**", "scripts/*/src/**", "configs/*/src/**"],
73
"exclude": [
84
"test",
9-
"testing",
5+
"packages/testing",
106
"config",
117
"**/*.d.ts",
128
"**/*.spec.{ts,js,tsx,jsx,cjs,mjs}",

mongosh.code-workspace

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
"name": "📦 @mongosh/shell-bson",
5757
"path": "packages/shell-bson"
5858
},
59+
{
60+
"name": "📦 @mongosh/testing",
61+
"path": "packages/testing"
62+
},
5963
{
6064
"name": "📦 @mongosh/arg-parser",
6165
"path": "packages/arg-parser"

package-lock.json

Lines changed: 37 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
"packages/i18n",
154154
"packages/logging",
155155
"packages/shell-bson",
156+
"packages/testing",
156157
"packages/arg-parser",
157158
"packages/service-provider-core",
158159
"packages/service-provider-node-driver",

packages/browser-repl/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
"@babel/plugin-proposal-class-properties": "^7.18.6",
7474
"@babel/preset-react": "^7.26.3",
7575
"@babel/preset-typescript": "^7.27.0",
76-
"mongodb": "^6.19.0",
7776
"@mongodb-js/compass-components": "*",
7877
"@mongodb-js/compass-editor": "*",
7978
"@mongodb-js/eslint-config-mongosh": "^1.0.0",
@@ -87,7 +86,6 @@
8786
"@types/react": "^16.9.17",
8887
"@types/react-dom": "^18.0.8",
8988
"@types/sinon": "^7.5.1",
90-
"@types/sinon-chai": "^4.0.0",
9189
"@types/text-table": "^0.2.1",
9290
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
9391
"babel-loader": "^8.3.0",
@@ -96,6 +94,7 @@
9694
"enzyme": "^3.11.0",
9795
"eslint": "^7.25.0",
9896
"html-webpack-plugin": "^5.5.0",
97+
"@mongosh/testing": "0.0.0-dev.0",
9998
"karma": "^6.3.9",
10099
"karma-chrome-launcher": "^3.1.0",
101100
"karma-cli": "^2.0.0",
@@ -104,6 +103,7 @@
104103
"karma-typescript": "^5.5.4",
105104
"karma-webpack": "^5.0.0",
106105
"lodash": "^4.17.21",
106+
"mongodb": "^6.19.0",
107107
"path-browserify": "^1.0.1",
108108
"prettier": "^2.8.8",
109109
"prop-types": "^15.7.2",

packages/browser-repl/src/components/editor.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sinon from 'sinon';
2-
import { expect } from '../../testing/chai';
2+
import { expect } from '@mongosh/testing';
33
import { Editor, createCommands } from './editor';
44
import type { Command } from '@mongodb-js/compass-editor';
55
import { shallow } from '../../testing/enzyme';

0 commit comments

Comments
 (0)