tweak mock

This commit is contained in:
Pan
2019-03-18 15:51:48 +08:00
parent 05ca5cae6d
commit 686d0acd6d
11 changed files with 171 additions and 114 deletions

View File

@@ -51,10 +51,9 @@ module.exports = {
extended: true
}))
// import ES2015 module from common.js module
const { default: mocks } = require('./mock')
for (const mock of mocks) {
app.all(mock.route, mock.response)
app[mock.type](mock.url, mock.response)
}
}
},