blob: b18d610146efa3adc5348a8c5fe230ae5665cc54 [file] [log] [blame] [edit]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
export async function exportedAsyncFunction() {}
export async function *exportedAsyncGeneratorFunction() {}
export function *exportedGeneratorFunction() {}
export function exportedFunction() {}
async function nonExportedAsyncFunction() {}
async function *nonExportedAsyncGeneratorFunction() {}
function *nonExportedGeneratorFunction() {}
function nonExportedFunction() {}
shouldBe(Object.getPrototypeOf(exportedAsyncFunction), Object.getPrototypeOf(nonExportedAsyncFunction));
shouldBe(Object.getPrototypeOf(exportedAsyncGeneratorFunction), Object.getPrototypeOf(nonExportedAsyncGeneratorFunction));
shouldBe(Object.getPrototypeOf(exportedGeneratorFunction), Object.getPrototypeOf(nonExportedGeneratorFunction));
shouldBe(Object.getPrototypeOf(exportedFunction), Object.getPrototypeOf(nonExportedFunction));