From 60fb786d2d8d51dc5fea6bae4cdd5b2817951cee Mon Sep 17 00:00:00 2001 From: Bob Olde Hampsink <378974+boboldehampsink@users.noreply.github.com> Date: Thu, 19 Nov 2020 13:21:26 +0100 Subject: [PATCH 1/2] Don't require ts-jest and typescript if you're not using typescript The resulting boolean is already validated at https://github.com/vuejs/vue-jest/blob/next/lib/process.js#L103 --- lib/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/utils.js b/lib/utils.js index 2f511189..861e1012 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -64,6 +64,9 @@ const getBabelOptions = function loadBabelOptions(filename, options = {}) { } const getTsJestConfig = function getTsJestConfig(config) { + if (getVueJestConfig(config).tsConfig === false) { + return false; + } const createTransformer = require('ts-jest').createTransformer const tr = createTransformer() const configSet = tr.configsFor(config) From 2d3a7d80b24a257a9223a10b8894853d5603c807 Mon Sep 17 00:00:00 2001 From: Bob Olde Hampsink Date: Mon, 23 Nov 2020 14:27:00 +0100 Subject: [PATCH 2/2] Return null --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index 861e1012..e2495fc4 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -65,7 +65,7 @@ const getBabelOptions = function loadBabelOptions(filename, options = {}) { const getTsJestConfig = function getTsJestConfig(config) { if (getVueJestConfig(config).tsConfig === false) { - return false; + return null } const createTransformer = require('ts-jest').createTransformer const tr = createTransformer()