Aktueller Stand

This commit is contained in:
2026-01-22 19:05:45 +01:00
parent 85dee61a4d
commit e280e4eadb
1967 changed files with 397327 additions and 74093 deletions

View File

@@ -1,7 +1,6 @@
'use strict'
const t = require('tap')
const test = t.test
const { test } = require('node:test')
const FindMyWay = require('..')
test('Double colon and parametric children', t => {
@@ -11,8 +10,8 @@ test('Double colon and parametric children', t => {
findMyWay.on('GET', '/::articles', () => {})
findMyWay.on('GET', '/:article_name', () => {})
t.same(findMyWay.find('GET', '/:articles').params, {})
t.same(findMyWay.find('GET', '/articles_param').params, { article_name: 'articles_param' })
t.assert.deepEqual(findMyWay.find('GET', '/:articles').params, {})
t.assert.deepEqual(findMyWay.find('GET', '/articles_param').params, { article_name: 'articles_param' })
})
test('Double colon and parametric children', t => {
@@ -22,11 +21,11 @@ test('Double colon and parametric children', t => {
findMyWay.on('GET', '/::test::foo/:param/::articles', () => {})
findMyWay.on('GET', '/::test::foo/:param/:article_name', () => {})
t.same(
t.assert.deepEqual(
findMyWay.find('GET', '/:test:foo/param_value1/:articles').params,
{ param: 'param_value1' }
)
t.same(
t.assert.deepEqual(
findMyWay.find('GET', '/:test:foo/param_value2/articles_param').params,
{ param: 'param_value2', article_name: 'articles_param' }
)