ladybird/Libraries/LibJS/Tests/comments-basic.js
Matthew Olsson eea6041302 LibJS: Convert some top-level tests to the new system
First test conversions! These look really good :)
2020-07-06 23:40:35 +02:00

25 lines
297 B
JavaScript

test("regular comments", () => {
const source =
`var i = 0;
// i++;
/* i++; */
/*
i++;
*/
return i;`;
expect(source).toEvalTo(0);
});
test("html comments", () => {
const source =
`var i = 0;
<!-- i++; --> i++;
<!-- i++;
i++;
--> i++;
return i;`
expect(source).toEvalTo(1);
});