|
1 | 1 | 'use strict' |
2 | 2 |
|
3 | 3 | const { test } = require('tap') |
4 | | -const { kReplySerializeWeakMap, kRouteContext } = require('../../lib/symbols') |
| 4 | +const { kReplyCacheSerializeFns, kRouteContext } = require('../../lib/symbols') |
5 | 5 | const Fastify = require('../../fastify') |
6 | 6 |
|
7 | 7 | function getDefaultSchema () { |
@@ -207,9 +207,9 @@ test('Reply#compileSerializationSchema', t => { |
207 | 207 | fastify.get('/', (req, reply) => { |
208 | 208 | const input = { hello: 'world' } |
209 | 209 |
|
210 | | - t.equal(reply[kRouteContext][kReplySerializeWeakMap], null) |
| 210 | + t.equal(reply[kRouteContext][kReplyCacheSerializeFns], null) |
211 | 211 | t.equal(reply.compileSerializationSchema(getDefaultSchema())(input), JSON.stringify(input)) |
212 | | - t.type(reply[kRouteContext][kReplySerializeWeakMap], WeakMap) |
| 212 | + t.type(reply[kRouteContext][kReplyCacheSerializeFns], WeakMap) |
213 | 213 | t.equal(reply.compileSerializationSchema(getDefaultSchema())(input), JSON.stringify(input)) |
214 | 214 |
|
215 | 215 | reply.send({ hello: 'world' }) |
@@ -408,9 +408,9 @@ test('Reply#getSerializationFunction', t => { |
408 | 408 |
|
409 | 409 | fastify.get('/', (req, reply) => { |
410 | 410 | t.notOk(reply.getSerializationFunction(getDefaultSchema())) |
411 | | - t.equal(reply[kRouteContext][kReplySerializeWeakMap], null) |
| 411 | + t.equal(reply[kRouteContext][kReplyCacheSerializeFns], null) |
412 | 412 | t.notOk(reply.getSerializationFunction('200')) |
413 | | - t.equal(reply[kRouteContext][kReplySerializeWeakMap], null) |
| 413 | + t.equal(reply[kRouteContext][kReplyCacheSerializeFns], null) |
414 | 414 |
|
415 | 415 | reply.send({ hello: 'world' }) |
416 | 416 | }) |
@@ -684,9 +684,9 @@ test('Reply#serializeInput', t => { |
684 | 684 |
|
685 | 685 | fastify.get('/', (req, reply) => { |
686 | 686 | const input = { hello: 'world' } |
687 | | - t.equal(reply[kRouteContext][kReplySerializeWeakMap], null) |
| 687 | + t.equal(reply[kRouteContext][kReplyCacheSerializeFns], null) |
688 | 688 | t.equal(reply.serializeInput(input, getDefaultSchema()), JSON.stringify(input)) |
689 | | - t.type(reply[kRouteContext][kReplySerializeWeakMap], WeakMap) |
| 689 | + t.type(reply[kRouteContext][kReplyCacheSerializeFns], WeakMap) |
690 | 690 |
|
691 | 691 | reply.send({ hello: 'world' }) |
692 | 692 | }) |
|
0 commit comments