mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
Libraries: Move to Userland/Libraries/
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 23:53:55 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/13d7c09125f
@@ -1,47 +0,0 @@
|
||||
test("basic functionality", () => {
|
||||
let o = {
|
||||
foo: 1,
|
||||
bar: "baz",
|
||||
qux: {
|
||||
get x() {
|
||||
return 10;
|
||||
},
|
||||
y() {
|
||||
return 20;
|
||||
},
|
||||
arr: [1, 2, 3],
|
||||
},
|
||||
};
|
||||
|
||||
let string = JSON.stringify(o, null, 4);
|
||||
let expected = `{
|
||||
"foo": 1,
|
||||
"bar": "baz",
|
||||
"qux": {
|
||||
"x": 10,
|
||||
"arr": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
}
|
||||
}`;
|
||||
|
||||
expect(string).toBe(expected);
|
||||
|
||||
string = JSON.stringify(o, null, "abcd");
|
||||
expected = `{
|
||||
abcd"foo": 1,
|
||||
abcd"bar": "baz",
|
||||
abcd"qux": {
|
||||
abcdabcd"x": 10,
|
||||
abcdabcd"arr": [
|
||||
abcdabcdabcd1,
|
||||
abcdabcdabcd2,
|
||||
abcdabcdabcd3
|
||||
abcdabcd]
|
||||
abcd}
|
||||
}`;
|
||||
|
||||
expect(string).toBe(expected);
|
||||
});
|
||||
Reference in New Issue
Block a user