From cd7c757dafef529065ebe3c39ec69d1023e41b0e Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Sun, 26 Apr 2020 11:57:32 +0200 Subject: [PATCH] tsc on test when typescript on --- lib/snippets/node/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/snippets/node/index.ts b/lib/snippets/node/index.ts index cb7a65e..454668f 100644 --- a/lib/snippets/node/index.ts +++ b/lib/snippets/node/index.ts @@ -56,8 +56,10 @@ export default class Node implements Snippet { lint: 'eslint . --ext .js,.jsx,.ts,.tsx,.vue,.mjs', test: 'nyc ava' }; - if (use_ts) + if (use_ts) { (obj.scripts as Record).compile = 'tsc'; + (obj.scripts as Record).test = 'tsc && nyc ava'; + } return obj; }, path.join (folder, 'package.json')); }