refactor: strictly typed

This commit is contained in:
harttle
2019-02-23 00:49:54 +08:00
parent 51f7e66f60
commit 5b6100d12b
86 changed files with 2630 additions and 2590 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ describe('express()', function () {
const root = resolve(__dirname, '../stub/root')
const views = resolve(__dirname, '../stub/views')
const partials = resolve(__dirname, '../stub/partials')
let app, engine
let app: express.Application, engine: Liquid
beforeEach(function () {
app = express()
@@ -45,7 +45,7 @@ describe('express()', function () {
}
const file = '/not-exist.html'
const ctx = {}
engine.express().call(view, file, ctx, function (err) {
engine.express().call(view, file, ctx, function (err: any) {
try {
expect(err.code).to.equal('ENOENT')
expect(err.message).to.match(/Failed to lookup/)