1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00
verdaccio/test/functional/plugins/middleware.js
Juan Picado @jotadeveloper a1a70c973f
refactor: middleware plugins
add es6 transpiled use case
2018-06-23 20:59:24 +02:00

24 lines
611 B
JavaScript

import {HTTP_STATUS} from "../../../src/lib/constants";
export default function (server2) {
describe('test plugin middlewares', () => {
test('should serve the registered route ES5', () => {
return server2.request({
uri: '/test/route',
method: 'GET'
})
.status(HTTP_STATUS.OK)
.body_ok('this is a custom route')
})
test('should serve the registered route ES6', () => {
return server2.request({
uri: '/test/route/es6',
method: 'GET'
})
.status(HTTP_STATUS.OK)
.body_ok('this is a custom route es6')
})
})
}