From 024ae4e8a94744b106474cab83bd3169548c51f3 Mon Sep 17 00:00:00 2001 From: uzlopak Date: Sun, 24 Dec 2023 00:37:37 +0100 Subject: [PATCH] improve decorator.test.js --- test/decorator.test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/decorator.test.js b/test/decorator.test.js index d0e845d..9dc486d 100644 --- a/test/decorator.test.js +++ b/test/decorator.test.js @@ -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)) })