Skip to content

Commit

Permalink
Merge 55162a5 into a1d9e51
Browse files Browse the repository at this point in the history
  • Loading branch information
timcosta committed Feb 6, 2021
2 parents a1d9e51 + 55162a5 commit 89f5516
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ internals.manifest = [
list: true,
useFilename: (filename, value, path) => {

if (Array.isArray(value)) {
if (Array.isArray(value) || Array.isArray(value.method)) {
return value;
}

Expand Down
7 changes: 7 additions & 0 deletions test/closet/routes/multi-method-route.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

module.exports = {
method: ['get', 'post'],
path: '/multi-method-route',
handler: () => 'multi-method-route'
};
2 changes: 2 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ describe('HauteCouture', () => {
expect(bigServer.lookup('arr-routes')).to.not.exist();
expect(bigServer.match('get', '/arr-route-one')).to.exist();
expect(bigServer.match('get', '/arr-route-two')).to.exist();
expect(bigServer.match('get', '/multi-method-route')).to.exist();
expect(bigServer.match('post', '/multi-method-route')).to.exist();
});

it('defines subscriptions in subscriptions/.', async (flags) => {
Expand Down

0 comments on commit 89f5516

Please sign in to comment.