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,9 +11,9 @@ test('Defining static route after parametric - 1', t => {
findMyWay.on('GET', '/static', noop)
findMyWay.on('GET', '/:param', noop)
t.ok(findMyWay.find('GET', '/static'))
t.ok(findMyWay.find('GET', '/para'))
t.ok(findMyWay.find('GET', '/s'))
t.assert.ok(findMyWay.find('GET', '/static'))
t.assert.ok(findMyWay.find('GET', '/para'))
t.assert.ok(findMyWay.find('GET', '/s'))
})
test('Defining static route after parametric - 2', t => {
@@ -24,9 +23,9 @@ test('Defining static route after parametric - 2', t => {
findMyWay.on('GET', '/:param', noop)
findMyWay.on('GET', '/static', noop)
t.ok(findMyWay.find('GET', '/static'))
t.ok(findMyWay.find('GET', '/para'))
t.ok(findMyWay.find('GET', '/s'))
t.assert.ok(findMyWay.find('GET', '/static'))
t.assert.ok(findMyWay.find('GET', '/para'))
t.assert.ok(findMyWay.find('GET', '/s'))
})
test('Defining static route after parametric - 3', t => {
@@ -37,10 +36,10 @@ test('Defining static route after parametric - 3', t => {
findMyWay.on('GET', '/static', noop)
findMyWay.on('GET', '/other', noop)
t.ok(findMyWay.find('GET', '/static'))
t.ok(findMyWay.find('GET', '/para'))
t.ok(findMyWay.find('GET', '/s'))
t.ok(findMyWay.find('GET', '/o'))
t.assert.ok(findMyWay.find('GET', '/static'))
t.assert.ok(findMyWay.find('GET', '/para'))
t.assert.ok(findMyWay.find('GET', '/s'))
t.assert.ok(findMyWay.find('GET', '/o'))
})
test('Defining static route after parametric - 4', t => {
@@ -51,10 +50,10 @@ test('Defining static route after parametric - 4', t => {
findMyWay.on('GET', '/other', noop)
findMyWay.on('GET', '/:param', noop)
t.ok(findMyWay.find('GET', '/static'))
t.ok(findMyWay.find('GET', '/para'))
t.ok(findMyWay.find('GET', '/s'))
t.ok(findMyWay.find('GET', '/o'))
t.assert.ok(findMyWay.find('GET', '/static'))
t.assert.ok(findMyWay.find('GET', '/para'))
t.assert.ok(findMyWay.find('GET', '/s'))
t.assert.ok(findMyWay.find('GET', '/o'))
})
test('Defining static route after parametric - 5', t => {
@@ -65,10 +64,10 @@ test('Defining static route after parametric - 5', t => {
findMyWay.on('GET', '/:param', noop)
findMyWay.on('GET', '/other', noop)
t.ok(findMyWay.find('GET', '/static'))
t.ok(findMyWay.find('GET', '/para'))
t.ok(findMyWay.find('GET', '/s'))
t.ok(findMyWay.find('GET', '/o'))
t.assert.ok(findMyWay.find('GET', '/static'))
t.assert.ok(findMyWay.find('GET', '/para'))
t.assert.ok(findMyWay.find('GET', '/s'))
t.assert.ok(findMyWay.find('GET', '/o'))
})
test('Should produce the same tree - 1', t => {
@@ -82,7 +81,7 @@ test('Should produce the same tree - 1', t => {
findMyWay2.on('GET', '/:param', noop)
findMyWay2.on('GET', '/static', noop)
t.equal(findMyWay1.tree, findMyWay2.tree)
t.assert.equal(findMyWay1.tree, findMyWay2.tree)
})
test('Should produce the same tree - 2', t => {
@@ -103,7 +102,7 @@ test('Should produce the same tree - 2', t => {
findMyWay3.on('GET', '/other', noop)
findMyWay3.on('GET', '/:param', noop)
t.equal(findMyWay1.tree, findMyWay2.tree)
t.equal(findMyWay2.tree, findMyWay3.tree)
t.equal(findMyWay1.tree, findMyWay3.tree)
t.assert.equal(findMyWay1.tree, findMyWay2.tree)
t.assert.equal(findMyWay2.tree, findMyWay3.tree)
t.assert.equal(findMyWay1.tree, findMyWay3.tree)
})