Aktueller Stand
This commit is contained in:
195
backend/node_modules/find-my-way/test/errors.test.js
generated
vendored
195
backend/node_modules/find-my-way/test/errors.test.js
generated
vendored
@@ -1,7 +1,6 @@
|
||||
'use strict'
|
||||
|
||||
const t = require('tap')
|
||||
const test = t.test
|
||||
const { test, describe } = require('node:test')
|
||||
const FindMyWay = require('../')
|
||||
|
||||
test('Method should be a string', t => {
|
||||
@@ -10,9 +9,9 @@ test('Method should be a string', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on(0, '/test', () => {})
|
||||
t.fail('method shoukd be a string')
|
||||
t.assert.fail('method shoukd be a string')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method should be a string')
|
||||
t.assert.equal(e.message, 'Method should be a string')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -22,9 +21,9 @@ test('Method should be a string [ignoreTrailingSlash=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on(0, '/test', () => {})
|
||||
t.fail('method shoukd be a string')
|
||||
t.assert.fail('method shoukd be a string')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method should be a string')
|
||||
t.assert.equal(e.message, 'Method should be a string')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -34,9 +33,9 @@ test('Method should be a string [ignoreDuplicateSlashes=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on(0, '/test', () => {})
|
||||
t.fail('method shoukd be a string')
|
||||
t.assert.fail('method shoukd be a string')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method should be a string')
|
||||
t.assert.equal(e.message, 'Method should be a string')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -46,9 +45,9 @@ test('Method should be a string (array)', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on(['GET', 0], '/test', () => {})
|
||||
t.fail('method shoukd be a string')
|
||||
t.assert.fail('method shoukd be a string')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method should be a string')
|
||||
t.assert.equal(e.message, 'Method should be a string')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -58,9 +57,9 @@ test('Method should be a string (array) [ignoreTrailingSlash=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on(['GET', 0], '/test', () => {})
|
||||
t.fail('method shoukd be a string')
|
||||
t.assert.fail('method shoukd be a string')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method should be a string')
|
||||
t.assert.equal(e.message, 'Method should be a string')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -70,9 +69,9 @@ test('Method should be a string (array) [ignoreDuplicateSlashes=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on(['GET', 0], '/test', () => {})
|
||||
t.fail('method shoukd be a string')
|
||||
t.assert.fail('method shoukd be a string')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method should be a string')
|
||||
t.assert.equal(e.message, 'Method should be a string')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -82,9 +81,9 @@ test('Path should be a string', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', 0, () => {})
|
||||
t.fail('path should be a string')
|
||||
t.assert.fail('path should be a string')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Path should be a string')
|
||||
t.assert.equal(e.message, 'Path should be a string')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -94,9 +93,9 @@ test('Path should be a string [ignoreTrailingSlash=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', 0, () => {})
|
||||
t.fail('path should be a string')
|
||||
t.assert.fail('path should be a string')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Path should be a string')
|
||||
t.assert.equal(e.message, 'Path should be a string')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -106,9 +105,9 @@ test('Path should be a string [ignoreDuplicateSlashes=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', 0, () => {})
|
||||
t.fail('path should be a string')
|
||||
t.assert.fail('path should be a string')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Path should be a string')
|
||||
t.assert.equal(e.message, 'Path should be a string')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -118,9 +117,9 @@ test('The path could not be empty', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '', () => {})
|
||||
t.fail('The path could not be empty')
|
||||
t.assert.fail('The path could not be empty')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'The path could not be empty')
|
||||
t.assert.equal(e.message, 'The path could not be empty')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -130,9 +129,9 @@ test('The path could not be empty [ignoreTrailingSlash=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '', () => {})
|
||||
t.fail('The path could not be empty')
|
||||
t.assert.fail('The path could not be empty')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'The path could not be empty')
|
||||
t.assert.equal(e.message, 'The path could not be empty')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -142,9 +141,9 @@ test('The path could not be empty [ignoreDuplicateSlashes=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '', () => {})
|
||||
t.fail('The path could not be empty')
|
||||
t.assert.fail('The path could not be empty')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'The path could not be empty')
|
||||
t.assert.equal(e.message, 'The path could not be empty')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -154,9 +153,9 @@ test('The first character of a path should be `/` or `*`', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', 'a', () => {})
|
||||
t.fail('The first character of a path should be `/` or `*`')
|
||||
t.assert.fail('The first character of a path should be `/` or `*`')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'The first character of a path should be `/` or `*`')
|
||||
t.assert.equal(e.message, 'The first character of a path should be `/` or `*`')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -166,9 +165,9 @@ test('The first character of a path should be `/` or `*` [ignoreTrailingSlash=tr
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', 'a', () => {})
|
||||
t.fail('The first character of a path should be `/` or `*`')
|
||||
t.assert.fail('The first character of a path should be `/` or `*`')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'The first character of a path should be `/` or `*`')
|
||||
t.assert.equal(e.message, 'The first character of a path should be `/` or `*`')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -178,9 +177,9 @@ test('The first character of a path should be `/` or `*` [ignoreDuplicateSlashes
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', 'a', () => {})
|
||||
t.fail('The first character of a path should be `/` or `*`')
|
||||
t.assert.fail('The first character of a path should be `/` or `*`')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'The first character of a path should be `/` or `*`')
|
||||
t.assert.equal(e.message, 'The first character of a path should be `/` or `*`')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -190,9 +189,9 @@ test('Handler should be a function', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test', 0)
|
||||
t.fail('handler should be a function')
|
||||
t.assert.fail('handler should be a function')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Handler should be a function')
|
||||
t.assert.equal(e.message, 'Handler should be a function')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -202,9 +201,9 @@ test('Method is not an http method.', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GETT', '/test', () => {})
|
||||
t.fail('method is not a valid http method')
|
||||
t.assert.fail('method is not a valid http method')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GETT\' is not an http method.')
|
||||
t.assert.equal(e.message, 'Method \'GETT\' is not an http method.')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -214,9 +213,9 @@ test('Method is not an http method. (array)', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on(['POST', 'GETT'], '/test', () => {})
|
||||
t.fail('method is not a valid http method')
|
||||
t.assert.fail('method is not a valid http method')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GETT\' is not an http method.')
|
||||
t.assert.equal(e.message, 'Method \'GETT\' is not an http method.')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -226,9 +225,9 @@ test('The default route must be a function', t => {
|
||||
FindMyWay({
|
||||
defaultRoute: '/404'
|
||||
})
|
||||
t.fail('default route must be a function')
|
||||
t.assert.fail('default route must be a function')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'The default route must be a function')
|
||||
t.assert.equal(e.message, 'The default route must be a function')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -239,9 +238,9 @@ test('Method already declared', t => {
|
||||
findMyWay.on('GET', '/test', () => {})
|
||||
try {
|
||||
findMyWay.on('GET', '/test', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -252,9 +251,9 @@ test('Method already declared if * is used', t => {
|
||||
findMyWay.on('GET', '/*', () => {})
|
||||
try {
|
||||
findMyWay.on('GET', '*', () => {})
|
||||
t.fail('should throw error')
|
||||
t.assert.fail('should throw error')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/*\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/*\' with constraints \'{}\'')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -265,16 +264,14 @@ test('Method already declared if /* is used', t => {
|
||||
findMyWay.on('GET', '*', () => {})
|
||||
try {
|
||||
findMyWay.on('GET', '/*', () => {})
|
||||
t.fail('should throw error')
|
||||
t.assert.fail('should throw error')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/*\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/*\' with constraints \'{}\'')
|
||||
}
|
||||
})
|
||||
|
||||
test('Method already declared [ignoreTrailingSlash=true]', t => {
|
||||
t.plan(2)
|
||||
|
||||
t.test('without trailing slash', t => {
|
||||
describe('Method already declared [ignoreTrailingSlash=true]', t => {
|
||||
test('without trailing slash', t => {
|
||||
t.plan(2)
|
||||
const findMyWay = FindMyWay({ ignoreTrailingSlash: true })
|
||||
|
||||
@@ -282,20 +279,20 @@ test('Method already declared [ignoreTrailingSlash=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
}
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test/', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
}
|
||||
})
|
||||
|
||||
t.test('with trailing slash', t => {
|
||||
test('with trailing slash', t => {
|
||||
t.plan(2)
|
||||
const findMyWay = FindMyWay({ ignoreTrailingSlash: true })
|
||||
|
||||
@@ -303,24 +300,22 @@ test('Method already declared [ignoreTrailingSlash=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
}
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test/', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
test('Method already declared [ignoreDuplicateSlashes=true]', t => {
|
||||
t.plan(2)
|
||||
|
||||
t.test('without duplicate slashes', t => {
|
||||
describe('Method already declared [ignoreDuplicateSlashes=true]', t => {
|
||||
test('without duplicate slashes', t => {
|
||||
t.plan(2)
|
||||
const findMyWay = FindMyWay({ ignoreDuplicateSlashes: true })
|
||||
|
||||
@@ -328,20 +323,20 @@ test('Method already declared [ignoreDuplicateSlashes=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
}
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '//test', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
}
|
||||
})
|
||||
|
||||
t.test('with duplicate slashes', t => {
|
||||
test('with duplicate slashes', t => {
|
||||
t.plan(2)
|
||||
const findMyWay = FindMyWay({ ignoreDuplicateSlashes: true })
|
||||
|
||||
@@ -349,16 +344,16 @@ test('Method already declared [ignoreDuplicateSlashes=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
}
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '//test', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{}\'')
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -373,16 +368,14 @@ test('Method already declared nested route', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test/hello', () => {})
|
||||
t.fail('method already delcared in nested route')
|
||||
t.assert.fail('method already delcared in nested route')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
}
|
||||
})
|
||||
|
||||
test('Method already declared nested route [ignoreTrailingSlash=true]', t => {
|
||||
t.plan(2)
|
||||
|
||||
t.test('without trailing slash', t => {
|
||||
describe('Method already declared nested route [ignoreTrailingSlash=true]', t => {
|
||||
test('without trailing slash', t => {
|
||||
t.plan(2)
|
||||
const findMyWay = FindMyWay({ ignoreTrailingSlash: true })
|
||||
|
||||
@@ -392,16 +385,16 @@ test('Method already declared nested route [ignoreTrailingSlash=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test/hello', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
}
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test/hello/', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -412,13 +405,13 @@ test('Method already declared nested route [ignoreTrailingSlash=true]', t => {
|
||||
findMyWay.on('GET', '/test', { constraints: { host: 'fastify.io' } }, () => {})
|
||||
try {
|
||||
findMyWay.on('GET', '/test', { constraints: { host: 'fastify.io' } }, () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{"host":"fastify.io"}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test\' with constraints \'{"host":"fastify.io"}\'')
|
||||
}
|
||||
})
|
||||
|
||||
t.test('with trailing slash', t => {
|
||||
test('with trailing slash', t => {
|
||||
t.plan(2)
|
||||
const findMyWay = FindMyWay({ ignoreTrailingSlash: true })
|
||||
|
||||
@@ -428,24 +421,22 @@ test('Method already declared nested route [ignoreTrailingSlash=true]', t => {
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test/hello', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
}
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test/hello/', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
test('Method already declared nested route [ignoreDuplicateSlashes=true]', t => {
|
||||
t.plan(2)
|
||||
|
||||
t.test('without duplicate slashes', t => {
|
||||
describe('Method already declared nested route [ignoreDuplicateSlashes=true]', t => {
|
||||
test('without duplicate slashes', t => {
|
||||
t.plan(2)
|
||||
const findMyWay = FindMyWay({ ignoreDuplicateSlashes: true })
|
||||
|
||||
@@ -455,20 +446,20 @@ test('Method already declared nested route [ignoreDuplicateSlashes=true]', t =>
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test/hello', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
}
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test//hello', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
}
|
||||
})
|
||||
|
||||
t.test('with duplicate slashes', t => {
|
||||
test('with duplicate slashes', t => {
|
||||
t.plan(2)
|
||||
const findMyWay = FindMyWay({ ignoreDuplicateSlashes: true })
|
||||
|
||||
@@ -478,16 +469,16 @@ test('Method already declared nested route [ignoreDuplicateSlashes=true]', t =>
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test/hello', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
}
|
||||
|
||||
try {
|
||||
findMyWay.on('GET', '/test//hello', () => {})
|
||||
t.fail('method already declared')
|
||||
t.assert.fail('method already declared')
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
t.assert.equal(e.message, 'Method \'GET\' already declared for route \'/test/hello\' with constraints \'{}\'')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user