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,23 +1,20 @@
'use strict'
const httpMethods = require('../lib/http-methods')
const t = require('tap')
const test = t.test
const { describe, test } = require('node:test')
const FindMyWay = require('../')
t.test('should support shorthand', t => {
t.plan(httpMethods.length)
describe('should support shorthand', t => {
for (const i in httpMethods) {
const m = httpMethods[i]
const methodName = m.toLowerCase()
t.test('`.' + methodName + '`', t => {
test('`.' + methodName + '`', t => {
t.plan(1)
const findMyWay = FindMyWay()
findMyWay[methodName]('/test', () => {
t.ok('inside the handler')
t.assert.ok('inside the handler')
})
findMyWay.lookup({ method: m, url: '/test', headers: {} }, null)
@@ -30,7 +27,7 @@ test('should support `.all` shorthand', t => {
const findMyWay = FindMyWay()
findMyWay.all('/test', () => {
t.ok('inside the handler')
t.assert.ok('inside the handler')
})
findMyWay.lookup({ method: 'GET', url: '/test', headers: {} }, null)