9 lines
341 B
JavaScript
9 lines
341 B
JavaScript
description(
|
|
"This test checks that the Function constructor works correctly in the presence of single line comments."
|
|
);
|
|
|
|
shouldBeTrue("(new Function('return true//'))()");
|
|
shouldBeTrue("(new Function('return true;//'))()");
|
|
shouldBeTrue("(new Function('a', 'return a//'))(true)");
|
|
shouldBeTrue("(new Function('a', 'return a;//'))(true)");
|