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('should sanitize the url - query', t => {
@@ -9,8 +8,8 @@ test('should sanitize the url - query', t => {
const findMyWay = FindMyWay()
findMyWay.on('GET', '/test', (req, res, params, store, query) => {
t.same(query, { hello: 'world' })
t.ok('inside the handler')
t.assert.deepEqual(query, { hello: 'world' })
t.assert.ok('inside the handler')
})
findMyWay.lookup({ method: 'GET', url: '/test?hello=world', headers: {} }, null)
@@ -21,8 +20,8 @@ test('should sanitize the url - hash', t => {
const findMyWay = FindMyWay()
findMyWay.on('GET', '/test', (req, res, params, store, query) => {
t.same(query, { hello: '' })
t.ok('inside the handler')
t.assert.deepEqual(query, { hello: '' })
t.assert.ok('inside the handler')
})
findMyWay.lookup({ method: 'GET', url: '/test#hello', headers: {} }, null)
@@ -35,8 +34,8 @@ test('handles path and query separated by ; with useSemicolonDelimiter enabled',
})
findMyWay.on('GET', '/test', (req, res, params, store, query) => {
t.same(query, { jsessionid: '123456' })
t.ok('inside the handler')
t.assert.deepEqual(query, { jsessionid: '123456' })
t.assert.ok('inside the handler')
})
findMyWay.lookup({ method: 'GET', url: '/test;jsessionid=123456', headers: {} }, null)
@@ -47,8 +46,8 @@ test('handles path and query separated by ? using ; in the path', t => {
const findMyWay = FindMyWay()
findMyWay.on('GET', '/test;jsessionid=123456', (req, res, params, store, query) => {
t.same(query, { foo: 'bar' })
t.ok('inside the handler')
t.assert.deepEqual(query, { foo: 'bar' })
t.assert.ok('inside the handler')
})
findMyWay.lookup({ method: 'GET', url: '/test;jsessionid=123456?foo=bar', headers: {} }, null)