Try other things

pull/1007/head
Rick Carlino 2018-10-12 14:14:44 -05:00
parent b3d1620446
commit aba2b3f35b
3 changed files with 3 additions and 4 deletions

View File

@ -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 .",

View File

@ -1,3 +1,4 @@
jest.resetAllMocks();
jest.mock("farmbot-toastr", () => ({
fun: jest.fn(),
init: jest.fn(),

View File

@ -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()