Skip to content

Commit

Permalink
fix: name of property error in generate
Browse files Browse the repository at this point in the history
  • Loading branch information
shooontan authored and manniL committed Apr 20, 2018
1 parent 48196f7 commit 52a5155
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions test/module.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('<?xml version="1.0" encoding="utf-8"?>\n' +
Expand Down

0 comments on commit 52a5155

Please sign in to comment.