mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-23 01:38:56 +00:00
LibJS: eval(x) should return x without evaluation if x is not a string
This commit is contained in:
parent
d792200a55
commit
60e630d5a0
Notes:
sideshowbarker
2024-07-18 21:16:35 +09:00
Author: https://github.com/awesomekling
Commit: 60e630d5a0
2 changed files with 9 additions and 4 deletions
|
@ -24,3 +24,8 @@ test("syntax error", () => {
|
|||
"Unexpected token Eof. Expected CurlyClose (line: 1, column: 2)"
|
||||
);
|
||||
});
|
||||
|
||||
test("returns 1st argument unless 1st argument is a string", () => {
|
||||
var string_object = new String("1 + 2");
|
||||
expect(string_object).toBe(string_object);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue