Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <[email protected]>
  • Loading branch information
mcollina committed Nov 13, 2024
1 parent 5f3af12 commit 4e1a7d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/plugin.v2.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { strict as assert } from 'node:assert/strict'
import { createRequire } from 'node:module'
import { test } from 'node:test'
import { fileURLToPath } from 'node:url'
import Fastify from 'fastify'
import fastifyOpenapiGlue from '../index.js'
const importJSON = createRequire(import.meta.url)
const localFile = (fileName) => new URL(fileName, import.meta.url).pathname
const localFile = (fileName) => fileURLToPath(new URL(fileName, import.meta.url))

const testSpec = await importJSON('./test-swagger.v2.json')
const petStoreSpec = await importJSON('./petstore-swagger.v2.json')
Expand Down
3 changes: 2 additions & 1 deletion test/plugin.v3.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { strict as assert } from 'node:assert/strict'
import { createRequire } from 'node:module'
import { test } from 'node:test'
import { fileURLToPath } from 'node:url'
import Fastify from 'fastify'
import fastifyOpenapiGlue from '../index.js'

const importJSON = createRequire(import.meta.url)
const localFile = (fileName) => new URL(fileName, import.meta.url).pathname
const localFile = (fileName) => fileURLToPath(new URL(fileName, import.meta.url))

const testSpec = await importJSON('./test-openapi.v3.json')
const petStoreSpec = await importJSON('./petstore-openapi.v3.json')
Expand Down

0 comments on commit 4e1a7d0

Please sign in to comment.