Add tests that will fail with ECMA 6 parsing

This commit is contained in:
James M. Greene
2022-07-22 18:01:42 -05:00
parent 1457a09e2b
commit 1fb9ba6653
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
const getAllDynamicRoute = async function() {
const routes = await (async () => {
return ['/posts/hello-world', '/posts/hello-again'];
})();
return routes;
};
export default {
target: 'static',
router: {base: '/docs/'},
mode: 'universal',
generate: {
async routes () {
return getAllDynamicRoute();
}
}
};

View File

@@ -0,0 +1,15 @@
const getAllDynamicRoute = async function() {
const routes = await (async () => {
return ['/posts/hello-world', '/posts/hello-again'];
})();
return routes;
};
export default {
mode: 'universal',
generate: {
async routes () {
return getAllDynamicRoute();
}
}
};