Skip to content

Commit b7f54b5

Browse files
authored
test(NODE-5517): display installed deps in CI (#4948)
1 parent de29d72 commit b7f54b5

6 files changed

Lines changed: 14 additions & 0 deletions

File tree

.mocharc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const [major] = process.versions.node.split('.');
55
/** @type {import("mocha").MochaOptions} */
66
module.exports = {
77
require: [
8+
'test/mocha_root_hooks.ts',
89
'source-map-support/register',
910
'ts-node/register',
1011
'test/tools/runner/throw_rejections.cjs',

test/explicit-resource-management/.mocharc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/mocharc.json",
3+
"require": [
4+
"../mocha_root_hooks.ts"
5+
],
36
"extension": [
47
"js"
58
],

test/manual/mocharc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const [major] = process.versions.node.split('.');
66
/** @type {import("mocha").MochaOptions} */
77
module.exports = {
88
require: [
9+
'test/mocha_root_hooks.ts',
910
'ts-node/register',
1011
'test/tools/runner/throw_rejections.cjs',
1112
'test/tools/runner/chai_addons.ts'

test/mocha_lambda.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const [major] = process.versions.node.split('.');
66
/** @type {import("mocha").MochaOptions} */
77
module.exports = {
88
require: [
9+
'test/mocha_root_hooks.ts',
910
'test/tools/runner/throw_rejections.cjs',
1011
'test/integration/node-specific/examples/setup.js'
1112
],

test/mocha_mongodb.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const [major] = process.versions.node.split('.');
66
/** @type {import("mocha").MochaOptions} */
77
module.exports = {
88
require: [
9+
'test/mocha_root_hooks.ts',
910
'source-map-support/register',
1011
'ts-node/register',
1112
'test/tools/runner/throw_rejections.cjs',

test/mocha_root_hooks.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { execSync } from 'child_process';
2+
3+
export const mochaHooks = {
4+
beforeAll() {
5+
console.log(`Installed dependencies:\n${execSync('npm ls').toString()}`);
6+
}
7+
};

0 commit comments

Comments
 (0)