From 52a5155e97998aa944b0f2c1a4e049bada0a1f80 Mon Sep 17 00:00:00 2001 From: shooontan Date: Fri, 20 Apr 2018 15:05:52 +0900 Subject: [PATCH] fix: name of property error in generate --- lib/module.js | 3 --- test/module.test.js | 2 -- 2 files changed, 5 deletions(-) diff --git a/lib/module.js b/lib/module.js index 3eac197..c1fc725 100644 --- a/lib/module.js +++ b/lib/module.js @@ -40,9 +40,6 @@ module.exports = async function feed () { await fs.outputFile(xmlGeneratePath, await feedCache.get(index)) }) - this.nuxt.hook('generate:extendRoutes', async routes => { - routes.push(feedOptions.path) - }) this.addServerMiddleware({ path: feedOptions.path, handler (req, res, next) { diff --git a/test/module.test.js b/test/module.test.js index 31abbb1..6f7eab5 100644 --- a/test/module.test.js +++ b/test/module.test.js @@ -23,8 +23,6 @@ describe('generator', async () => { const generator = new Generator(nuxt, new Builder(nuxt)) await generator.initiate() - const routes = await generator.initRoutes() - expect(routes.includes('/feed.xml')).toBe(true) expect(fs.readFileSync(filePath, { encoding: 'utf8' })) .toBe('\n' +