From 7235b40eefad46c09e477eab27208c0169f46cdb Mon Sep 17 00:00:00 2001 From: Nate Fischer Date: Fri, 9 May 2025 00:13:34 -0700 Subject: [PATCH] test: add missing test case This adds coverage for CoffeeScript extension inference. The feature was already supported, but was not tested properly. --- test/shjs.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/shjs.js b/test/shjs.js index 245222e..c251eba 100644 --- a/test/shjs.js +++ b/test/shjs.js @@ -47,13 +47,20 @@ test('CoffeeScript', t => { t.falsy(result.stderr); }); -test('Extension detection', t => { +test('JS extension inference', t => { const result = runWithShjs('a-file'); t.is(result.code, 0); t.is(result.stdout, 'OK!\n'); t.falsy(result.stderr); }); +test('CoffeeScript extension inference', t => { + const result = runWithShjs('coffeescript'); + t.is(result.code, 0); + t.is(result.stdout, 'CoffeeScript: OK!\n'); + t.falsy(result.stderr); +}); + // // Invalids //