Projektstart

This commit is contained in:
2026-01-22 15:49:12 +01:00
parent 7212eb6f7a
commit 57e5f652f8
10637 changed files with 2598792 additions and 64 deletions

28
backend/node_modules/find-my-way/test/issue-62.test.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
'use strict'
const t = require('tap')
const FindMyWay = require('../')
const noop = function () {}
t.test('issue-62', (t) => {
t.plan(2)
const findMyWay = FindMyWay({ allowUnsafeRegex: true })
findMyWay.on('GET', '/foo/:id(([a-f0-9]{3},?)+)', noop)
t.notOk(findMyWay.find('GET', '/foo/qwerty'))
t.ok(findMyWay.find('GET', '/foo/bac,1ea'))
})
t.test('issue-62 - escape chars', (t) => {
const findMyWay = FindMyWay()
t.plan(2)
findMyWay.get('/foo/:param(\\([a-f0-9]{3}\\))', noop)
t.notOk(findMyWay.find('GET', '/foo/abc'))
t.ok(findMyWay.find('GET', '/foo/(abc)', {}))
})