mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
22 lines
577 B
JavaScript
22 lines
577 B
JavaScript
|
"use strict";
|
||
|
|
||
|
module.exports = function (t, a) {
|
||
|
a(t({ foo: "bar" }), JSON.stringify({ foo: "bar" }));
|
||
|
a(t({ foo: { elo: 12 } }), "{\"foo\":{\"elo\":12}}");
|
||
|
a(
|
||
|
t({ foo: { elo: 12, mel: { toJSON: function () { throw new Error("Nu nu!"); } } } }),
|
||
|
"{\"foo\":{\"elo\":12}}"
|
||
|
);
|
||
|
a(
|
||
|
t({ foo: { elo: 12 }, mel: { toJSON: function () { throw new Error("Nu nu!"); } } }),
|
||
|
"{\"foo\":{\"elo\":12}}"
|
||
|
);
|
||
|
a(
|
||
|
t({
|
||
|
foo: { elo: 12 },
|
||
|
mel: ["raz", { toJSON: function () { throw new Error("Nu nu!"); } }, 0, 2]
|
||
|
}),
|
||
|
"{\"foo\":{\"elo\":12},\"mel\":[\"raz\",0,2]}"
|
||
|
);
|
||
|
};
|