Try other things
parent
b3d1620446
commit
aba2b3f35b
|
@ -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 .",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
jest.resetAllMocks();
|
||||
jest.mock("farmbot-toastr", () => ({
|
||||
fun: jest.fn(),
|
||||
init: jest.fn(),
|
||||
|
|
|
@ -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> = {}): string => {
|
||||
const precompiledTemplate = mockTemplate(i);
|
||||
const precompiledTemplate = template(i);
|
||||
return precompiledTemplate(translation);
|
||||
},
|
||||
init: jest.fn()
|
||||
|
|
Loading…
Reference in New Issue