Skip to content

Commit 7235b40

Browse files
committed
test: add missing test case
This adds coverage for CoffeeScript extension inference. The feature was already supported, but was not tested properly.
1 parent 15ae87b commit 7235b40

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

test/shjs.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,20 @@ test('CoffeeScript', t => {
4747
t.falsy(result.stderr);
4848
});
4949

50-
test('Extension detection', t => {
50+
test('JS extension inference', t => {
5151
const result = runWithShjs('a-file');
5252
t.is(result.code, 0);
5353
t.is(result.stdout, 'OK!\n');
5454
t.falsy(result.stderr);
5555
});
5656

57+
test('CoffeeScript extension inference', t => {
58+
const result = runWithShjs('coffeescript');
59+
t.is(result.code, 0);
60+
t.is(result.stdout, 'CoffeeScript: OK!\n');
61+
t.falsy(result.stderr);
62+
});
63+
5764
//
5865
// Invalids
5966
//

0 commit comments

Comments
 (0)