Skip to content

Commit

Permalink
[Tests] increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Apr 7, 2023
1 parent b42ac73 commit a66de94
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ var parse = require('../').parse;
test('parse shell commands', function (t) {
t.same(parse(''), [], 'parses an empty string');

t['throws'](
function () { parse('${}'); },
Error,
'empty substitution throws'
);
t['throws'](
function () { parse('${'); },
Error,
'incomplete substitution throws'
);

t.same(parse('a \'b\' "c"'), ['a', 'b', 'c']);
t.same(
parse('beep "boop" \'foo bar baz\' "it\'s \\"so\\" groovy"'),
Expand Down

0 comments on commit a66de94

Please sign in to comment.