From 9d697c95a22d31d4a163b37628f5809a362f6938 Mon Sep 17 00:00:00 2001 From: mudkip Date: Mon, 13 Feb 2017 19:49:34 +0800 Subject: [PATCH] Update koa-hbs test file --- koa-hbs/koa-hbs-tests.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/koa-hbs/koa-hbs-tests.ts b/koa-hbs/koa-hbs-tests.ts index 647eee7f22..43c708b581 100644 --- a/koa-hbs/koa-hbs-tests.ts +++ b/koa-hbs/koa-hbs-tests.ts @@ -1,16 +1,15 @@ -import * as Hbs from 'koa-hbs'; import * as Koa from 'koa'; +import hbs = require("koa-hbs"); import * as Path from 'path'; const app = new Koa(); -const hbs = new Hbs(); app.use(hbs.middleware({ viewPath: Path.join(__dirname, './views') })); -app.use(function *(next: any) { - yield this.render('index', { +app.use(async (ctx, next) => { + await this.render('index', { title: 'Hello World!' }); });