From e11ccc55addaec7abd755d9567532500900d5c5c Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 22 Feb 2018 17:09:57 +0100 Subject: [PATCH 1/3] fix regex for detection of jest.js --- src/JestExt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JestExt.ts b/src/JestExt.ts index a9e600ffe..4da21ea8d 100644 --- a/src/JestExt.ts +++ b/src/JestExt.ts @@ -501,7 +501,7 @@ export class JestExt { case '#!/bin/sh': { const line = lines[8] - const match = /^\s*"[^"]+"\s+"$basedir\/([^"]+)"/.exec(line) + const match = /^\s*"[^"]+"\s+"\$basedir\/([^"]+)"/.exec(line) if (match) { return path.join(path.dirname(jest), match[1]) } From 039f12a27cda06149a5790270bbce354ecf04073 Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 22 Feb 2018 17:37:01 +0100 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bcbda316..ceeb07e56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ Bug-fixes within the same version aren't needed ## Master +* Fixes debugging of tasks on Windows (bug introduced in 2.6.2) - stephtr + ### 2.6.3 * Even better detection logic for projects created by `create-react-app` - stephtr From 792b26a884eda50e5d287e88d38d1f0382ff899d Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 22 Feb 2018 17:52:33 +0100 Subject: [PATCH 3/3] Add error message when trying to debug tasks via `npm test` --- src/JestExt.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/JestExt.ts b/src/JestExt.ts index 4da21ea8d..5a5e0278d 100644 --- a/src/JestExt.ts +++ b/src/JestExt.ts @@ -512,6 +512,12 @@ export class JestExt { break } + + case 'npm test --': + case 'npm.cmd test --': { + vscode.window.showErrorMessage('Debugging of tasks is currently only available when directly running jest!') + return undefined + } } vscode.window.showErrorMessage('Cannot find jest.js file!')