queckezz / koa-views

Template rendering middleware for koa (hbs, swig, pug, anything! :sparkles:)
MIT License
710 stars 87 forks source link

Render failed if filename contains dot and be passed without extension #87

Closed int64ago closed 7 years ago

int64ago commented 7 years ago

file: fixtures/basic.test.html

test case:

  it('name with dot', function (done) {
    const app = new Koa()
    .use(views(__dirname))
    .use(function (ctx) {
      return ctx.render('./fixtures/basic.test')
    })

    request(app.listen()).get('/')
      .expect('Content-Type', /html/)
      .expect(/basic:html/)
      .expect(200, done)
  })
queckezz commented 7 years ago

Closed via #88