(notDecorated, instanceType)
| 1257 | t.plan(9) |
| 1258 | |
| 1259 | function assertsThrowOnUndeclaredDecorator (notDecorated, instanceType) { |
| 1260 | try { |
| 1261 | notDecorated.getDecorator('foo') |
| 1262 | t.assert.fail() |
| 1263 | } catch (e) { |
| 1264 | t.assert.deepEqual(e.code, 'FST_ERR_DEC_UNDECLARED') |
| 1265 | t.assert.deepEqual(e.message, `No decorator 'foo' has been declared on ${instanceType}.`) |
| 1266 | } |
| 1267 | } |
| 1268 | |
| 1269 | const fastify = Fastify() |
| 1270 | fastify.register(child => { |
no test coverage detected