apicco-lib
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -115,3 +115,3 @@ const path = require('path'); | ||
return compose([ | ||
const middleware = compose([ | ||
router.routes(), | ||
@@ -126,4 +126,8 @@ router.allowedMethods({ | ||
]); | ||
middleware.router = router; | ||
return middleware; | ||
} | ||
module.exports = buildAPI; |
/* eslint-env jest */ | ||
const koaRouter = require('koa-router'); | ||
const buildAPI = require('./build'); | ||
@@ -88,2 +89,7 @@ | ||
}); | ||
test('assigns koa-router to returned apicco middleware', async () => { | ||
const middleware = buildAPI(); | ||
expect(middleware.router).toBeInstanceOf(koaRouter); | ||
}); | ||
}); |
{ | ||
"name": "apicco-lib", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18942
310