Skip to content

Commit ad70a18

Browse files
committed
Add failing test for #51
1 parent 78e8234 commit ad70a18

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,8 @@ test('line endings - works at EOF', t => {
6363
test('handles weird escaping', t => {
6464
t.is(stripJsonComments(String.raw`{"x":"x \"sed -e \\\"s/^.\\\\{46\\\\}T//\\\" -e \\\"s/#033/\\\\x1b/g\\\"\""}`), String.raw`{"x":"x \"sed -e \\\"s/^.\\\\{46\\\\}T//\\\" -e \\\"s/#033/\\\\x1b/g\\\"\""}`);
6565
});
66+
67+
test.failing('handles malformed block comments', t => {
68+
t.is(stripJsonComments('[] */'), '[] */');
69+
t.is(stripJsonComments('[] /*'), '[] /*'); // Fails
70+
});

0 commit comments

Comments
 (0)