diff --git a/package.json b/package.json index b15356cd9..054043b4b 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "start": "echo 'use `sudo docker-compose up` instead.'", "heroku-postbuild": "webpack --config=./config/webpack.prod.js", "webpack": "./node_modules/.bin/webpack-dev-server --config config/webpack.dev.js", - "test-slow": "jest --runInBand --coverage --ci", + "test-slow": "jest --coverage --ci --maxWorkers=6", "test": "jest --no-coverage --cache -w 5", "typecheck": "./node_modules/.bin/tsc --noEmit --jsx preserve", "tslint": "./node_modules/tslint/bin/tslint --project .", diff --git a/webpack/__test_support__/mock_fbtoaster.ts b/webpack/__test_support__/mock_fbtoaster.ts index 26bfad22e..c714230e8 100644 --- a/webpack/__test_support__/mock_fbtoaster.ts +++ b/webpack/__test_support__/mock_fbtoaster.ts @@ -1,3 +1,4 @@ +jest.resetAllMocks(); jest.mock("farmbot-toastr", () => ({ fun: jest.fn(), init: jest.fn(), diff --git a/webpack/__test_support__/unmock_i18next.ts b/webpack/__test_support__/unmock_i18next.ts index 8f5d72204..c2e92f01d 100644 --- a/webpack/__test_support__/unmock_i18next.ts +++ b/webpack/__test_support__/unmock_i18next.ts @@ -3,11 +3,9 @@ import { Dictionary } from "farmbot"; templateSettings.interpolate = /{{([\s\S]+?)}}/g; -const mockTemplate = template; - jest.mock("i18next", () => ({ t: (i: string, translation: Dictionary = {}): string => { - const precompiledTemplate = mockTemplate(i); + const precompiledTemplate = template(i); return precompiledTemplate(translation); }, init: jest.fn()