Skip to content

Commit 963d6a6

Browse files
update tests
1 parent 414b781 commit 963d6a6

File tree

20 files changed

+136
-8
lines changed

20 files changed

+136
-8
lines changed

packages/contentstack-audit/.mocharc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"require": [
33
"test/helpers/init.js",
4-
"ts-node/register"
4+
"ts-node/register",
5+
"test/helpers/mocha-root-hooks.js"
56
],
67
"watch-extensions": [
78
"ts"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @contentstack/cli-utilities uses lazy-loaded Chalk 5; preload before tests that hit cliux.
3+
*/
4+
const { loadChalk } = require('@contentstack/cli-utilities');
5+
6+
exports.mochaHooks = {
7+
beforeAll() {
8+
this.timeout(30_000);
9+
return loadChalk();
10+
},
11+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": ["test/helpers/mocha-root-hooks.js"],
3+
"recursive": true,
4+
"timeout": 60000
5+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @contentstack/cli-utilities uses lazy-loaded Chalk 5; preload before tests that hit cliux.
3+
*/
4+
const { loadChalk } = require('@contentstack/cli-utilities');
5+
6+
exports.mochaHooks = {
7+
beforeAll() {
8+
this.timeout(30_000);
9+
return loadChalk();
10+
},
11+
};

packages/contentstack-branches/.mocharc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"require": [
33
"test/helpers/init.js",
44
"ts-node/register",
5-
"source-map-support/register"
5+
"source-map-support/register",
6+
"test/helpers/mocha-root-hooks.js"
67
],
78
"watch-extensions": [
89
"ts"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @contentstack/cli-utilities uses lazy-loaded Chalk 5; preload before tests that hit cliux.
3+
*/
4+
const { loadChalk } = require('@contentstack/cli-utilities');
5+
6+
exports.mochaHooks = {
7+
beforeAll() {
8+
this.timeout(30_000);
9+
return loadChalk();
10+
},
11+
};

packages/contentstack-clone/.mocharc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"require": ["test/helpers/init.js", "ts-node/register", "source-map-support/register"],
2+
"require": ["test/helpers/init.js", "ts-node/register", "source-map-support/register", "test/helpers/mocha-root-hooks.js"],
33
"watch-extensions": [
44
"ts"
55
],
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @contentstack/cli-utilities uses lazy-loaded Chalk 5; preload before tests that hit cliux.
3+
*/
4+
const { loadChalk } = require('@contentstack/cli-utilities');
5+
6+
exports.mochaHooks = {
7+
beforeAll() {
8+
this.timeout(30_000);
9+
return loadChalk();
10+
},
11+
};

packages/contentstack-export-to-csv/.mocharc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"require": [
3-
"ts-node/register"
3+
"test/helpers/init.js",
4+
"ts-node/register",
5+
"test/helpers/mocha-root-hooks.js"
46
],
57
"watch-extensions": [
68
"ts"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @contentstack/cli-utilities uses lazy-loaded Chalk 5; preload before tests that hit cliux.
3+
*/
4+
const { loadChalk } = require('@contentstack/cli-utilities');
5+
6+
exports.mochaHooks = {
7+
beforeAll() {
8+
this.timeout(30_000);
9+
return loadChalk();
10+
},
11+
};

0 commit comments

Comments
 (0)