blob: 2f96a1195798f59811d276cab059f9d759a1f5da [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
shouldBe((function test() { }).toString(), `function test() { }`);
shouldBe((() => { }).toString(), `() => { }`);
shouldBe((function* test() { }).toString(), `function* test() { }`);
shouldBe((async function* test() { }).toString(), `async function* test() { }`);
shouldBe((async function test() { }).toString(), `async function test() { }`);
shouldBe((async () => { }).toString(), `async () => { }`);