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('handler should have the store object', t => {
@@ -9,7 +8,7 @@ test('handler should have the store object', t => {
const findMyWay = FindMyWay()
findMyWay.on('GET', '/test', (req, res, params, store) => {
t.equal(store.hello, 'world')
t.assert.equal(store.hello, 'world')
}, { hello: 'world' })
findMyWay.lookup({ method: 'GET', url: '/test', headers: {} }, null)
@@ -22,7 +21,7 @@ test('find a store object', t => {
findMyWay.on('GET', '/test', fn, { hello: 'world' })
t.same(findMyWay.find('GET', '/test'), {
t.assert.deepEqual(findMyWay.find('GET', '/test'), {
handler: fn,
params: {},
store: { hello: 'world' },
@@ -37,12 +36,12 @@ test('update the store', t => {
findMyWay.on('GET', '/test', (req, res, params, store) => {
if (!bool) {
t.equal(store.hello, 'world')
t.assert.equal(store.hello, 'world')
store.hello = 'hello'
bool = true
findMyWay.lookup({ method: 'GET', url: '/test', headers: {} }, null)
} else {
t.equal(store.hello, 'hello')
t.assert.equal(store.hello, 'hello')
}
}, { hello: 'world' })