Skip to content

Commit

Permalink
improve decorator.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Dec 23, 2023
1 parent 95a662e commit 024ae4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/decorator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ const fastifySwagger = require('@fastify/swagger')
const fastifySwaggerUi = require('../index')

test('fastify.swaggerCSP should exist', async (t) => {
t.plan(1)
t.plan(3)
const fastify = Fastify()

await fastify.register(fastifySwagger)
await fastify.register(fastifySwaggerUi)

await fastify.ready()
t.ok(fastify.swaggerCSP)
t.ok(Array.isArray(fastify.swaggerCSP.script))
t.ok(Array.isArray(fastify.swaggerCSP.style))
})

0 comments on commit 024ae4e

Please sign in to comment.