Skip to content

Commit

Permalink
Add tests that will fail with ECMA 6 parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
James M. Greene authored and James M. Greene committed Jul 22, 2022
1 parent 1457a09 commit 1fb9ba6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/fixtures/nuxt/async.expected.js
Original file line number Diff line number Diff line change
@@ -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();
}
}
};

15 changes: 15 additions & 0 deletions src/fixtures/nuxt/async.js
Original file line number Diff line number Diff line change
@@ -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();
}
}
};

0 comments on commit 1fb9ba6

Please sign in to comment.