find-my-way
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -206,3 +206,3 @@ 'use strict' | ||
} | ||
paramName += ' ' + prefix + ':' + param + ` (${method})` | ||
paramName += prefix + ' :' + param + ` (${method})` | ||
paramName += (index === methods.length - 1 ? '' : '\n') | ||
@@ -209,0 +209,0 @@ } else { |
{ | ||
"name": "find-my-way", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Crazy fast http radix based router", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -93,1 +93,25 @@ 'use strict' | ||
}) | ||
test('pretty print - parametric routes with same parent and followed by a static route which has the same prefix with the former routes', t => { | ||
t.plan(2) | ||
const findMyWay = FindMyWay() | ||
findMyWay.on('GET', '/test', () => {}) | ||
findMyWay.on('GET', '/test/hello/:id', () => {}) | ||
findMyWay.on('POST', '/test/hello/:id', () => {}) | ||
findMyWay.on('GET', '/test/helloworld', () => {}) | ||
const tree = findMyWay.prettyPrint() | ||
const expected = `└── / | ||
└── test (GET) | ||
└── /hello | ||
├── / | ||
│ └── :id (GET) | ||
│ :id (POST) | ||
└── world (GET) | ||
` | ||
t.is(typeof tree, 'string') | ||
t.equal(tree, expected) | ||
}) |
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
159986
4468