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('../')
const noop = () => {}
@@ -12,7 +11,7 @@ test('single-character prefix', t => {
findMyWay.on('GET', '/b/', noop)
findMyWay.on('GET', '/b/bulk', noop)
t.equal(findMyWay.find('GET', '/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bulk'), null)
})
test('multi-character prefix', t => {
@@ -22,7 +21,7 @@ test('multi-character prefix', t => {
findMyWay.on('GET', '/bu/', noop)
findMyWay.on('GET', '/bu/bulk', noop)
t.equal(findMyWay.find('GET', '/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bulk'), null)
})
test('static / 1', t => {
@@ -32,7 +31,7 @@ test('static / 1', t => {
findMyWay.on('GET', '/bb/', noop)
findMyWay.on('GET', '/bb/bulk', noop)
t.equal(findMyWay.find('GET', '/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bulk'), null)
})
test('static / 2', t => {
@@ -42,8 +41,8 @@ test('static / 2', t => {
findMyWay.on('GET', '/bb/ff/', noop)
findMyWay.on('GET', '/bb/ff/bulk', noop)
t.equal(findMyWay.find('GET', '/bulk'), null)
t.equal(findMyWay.find('GET', '/ff/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/ff/bulk'), null)
})
test('static / 3', t => {
@@ -55,7 +54,7 @@ test('static / 3', t => {
findMyWay.on('GET', '/bb/ff/gg/bulk', noop)
findMyWay.on('GET', '/bb/ff/bulk/bulk', noop)
t.equal(findMyWay.find('GET', '/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bulk'), null)
})
test('with parameter / 1', t => {
@@ -65,7 +64,7 @@ test('with parameter / 1', t => {
findMyWay.on('GET', '/:foo/', noop)
findMyWay.on('GET', '/:foo/bulk', noop)
t.equal(findMyWay.find('GET', '/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bulk'), null)
})
test('with parameter / 2', t => {
@@ -75,7 +74,7 @@ test('with parameter / 2', t => {
findMyWay.on('GET', '/bb/', noop)
findMyWay.on('GET', '/bb/:foo', noop)
t.equal(findMyWay.find('GET', '/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bulk'), null)
})
test('with parameter / 3', t => {
@@ -85,7 +84,7 @@ test('with parameter / 3', t => {
findMyWay.on('GET', '/bb/ff/', noop)
findMyWay.on('GET', '/bb/ff/:foo', noop)
t.equal(findMyWay.find('GET', '/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bulk'), null)
})
test('with parameter / 4', t => {
@@ -95,7 +94,7 @@ test('with parameter / 4', t => {
findMyWay.on('GET', '/bb/:foo/', noop)
findMyWay.on('GET', '/bb/:foo/bulk', noop)
t.equal(findMyWay.find('GET', '/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bulk'), null)
})
test('with parameter / 5', t => {
@@ -105,8 +104,8 @@ test('with parameter / 5', t => {
findMyWay.on('GET', '/bb/:foo/aa/', noop)
findMyWay.on('GET', '/bb/:foo/aa/bulk', noop)
t.equal(findMyWay.find('GET', '/bulk'), null)
t.equal(findMyWay.find('GET', '/bb/foo/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bb/foo/bulk'), null)
})
test('with parameter / 6', t => {
@@ -116,9 +115,9 @@ test('with parameter / 6', t => {
findMyWay.on('GET', '/static/:parametric/static/:parametric', noop)
findMyWay.on('GET', '/static/:parametric/static/:parametric/bulk', noop)
t.equal(findMyWay.find('GET', '/bulk'), null)
t.equal(findMyWay.find('GET', '/static/foo/bulk'), null)
t.not(findMyWay.find('GET', '/static/foo/static/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/static/foo/bulk'), null)
t.assert.notEqual(findMyWay.find('GET', '/static/foo/static/bulk'), null)
})
test('wildcard / 1', t => {
@@ -128,5 +127,5 @@ test('wildcard / 1', t => {
findMyWay.on('GET', '/bb/', noop)
findMyWay.on('GET', '/bb/*', noop)
t.equal(findMyWay.find('GET', '/bulk'), null)
t.assert.equal(findMyWay.find('GET', '/bulk'), null)
})