From 2ee4cad33ee20e428f440a68dc9ef51fdd9e08f7 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 13 Oct 2023 11:23:04 +1100 Subject: [PATCH] chore: move mocha config to .mocharc.yml to package.json is cleaner --- .mocharc.yml | 11 +++++++++++ package.json | 2 +- .../job_runner/user_sync_job/UserSyncJob_test.ts | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .mocharc.yml diff --git a/.mocharc.yml b/.mocharc.yml new file mode 100644 index 000000000..92a0030ea --- /dev/null +++ b/.mocharc.yml @@ -0,0 +1,11 @@ +jobs: 1 +package: './package.json' +parallel: false +exit: true +recursive: true +require: 'jsdom-global/register' +sort: false +spec: + - './ts/test/**/*_test.js' # the positional arguments! +timeout: 1000 +watch: false diff --git a/package.json b/package.json index c54af41a1..3fe211f67 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "lint-full": "yarn format-full && eslint .", "format-full": "prettier --list-different --write \"*.{css,js,json,scss,ts,tsx}\" \"./**/*.{css,js,json,scss,ts,tsx}\"", "start-prod-test": "cross-env NODE_ENV=production NODE_APP_INSTANCE=$MULTI electron .", - "test": "mocha -r jsdom-global/register --recursive --exit --timeout 10000 \"./ts/test/**/*_test.js\"", + "test": "mocha", "build-release": "run-script-os", "build-release-non-linux": "yarn build-everything && cross-env SIGNAL_ENV=production electron-builder --config.extraMetadata.environment=production --publish=never --config.directories.output=release", "build-release:win32": "yarn build-release-non-linux", diff --git a/ts/test/session/unit/utils/job_runner/user_sync_job/UserSyncJob_test.ts b/ts/test/session/unit/utils/job_runner/user_sync_job/UserSyncJob_test.ts index f24b1ab56..6a91e0b47 100644 --- a/ts/test/session/unit/utils/job_runner/user_sync_job/UserSyncJob_test.ts +++ b/ts/test/session/unit/utils/job_runner/user_sync_job/UserSyncJob_test.ts @@ -92,7 +92,7 @@ describe('UserSyncJob run()', () => { }); }); -describe('UserSyncJob resultsToSuccessfulChange', () => { +describe('UserSyncJob batchResultsToUserSuccessfulChange', () => { let sodium: LibSodiumWrappers; beforeEach(async () => { sodium = await getSodiumNode();