Aktueller Stand
This commit is contained in:
19
backend/node_modules/find-my-way/test/querystring.test.js
generated
vendored
19
backend/node_modules/find-my-way/test/querystring.test.js
generated
vendored
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user