First commit

This commit is contained in:
2026-01-12 13:12:46 +01:00
parent b2d9501f6d
commit a1fbd8acf5
4413 changed files with 1245183 additions and 0 deletions

32
node_modules/find-my-way/test/issue-101.test.js generated vendored Normal file
View File

@@ -0,0 +1,32 @@
'use strict'
const t = require('tap')
const test = t.test
const FindMyWay = require('../')
test('Falling back for node\'s parametric brother', t => {
t.plan(3)
const findMyWay = FindMyWay({
defaultRoute: (req, res) => {
t.fail('Should not be defaultRoute')
}
})
findMyWay.on('GET', '/:namespace/:type/:id', () => {})
findMyWay.on('GET', '/:namespace/jobs/:name/run', () => {})
t.same(
findMyWay.find('GET', '/test_namespace/test_type/test_id').params,
{ namespace: 'test_namespace', type: 'test_type', id: 'test_id' }
)
t.same(
findMyWay.find('GET', '/test_namespace/jobss/test_id').params,
{ namespace: 'test_namespace', type: 'jobss', id: 'test_id' }
)
t.same(
findMyWay.find('GET', '/test_namespace/jobs/test_id').params,
{ namespace: 'test_namespace', type: 'jobs', id: 'test_id' }
)
})