Skip to content

Commit

Permalink
Update test/cors.test.js
Browse files Browse the repository at this point in the history
Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>
  • Loading branch information
mohammedSlimani and Eomm authored Nov 19, 2023
1 parent ab7623a commit 62c3b47
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/cors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -949,11 +949,8 @@ test('should support embedded cors registration with route params', t => {
const fastify = Fastify()

const custom = async (instance, opts) => {
instance.register(cors, instance => async (req, cb) => {
const corsOptions = {
origin: ['example.com']
}
cb(null, corsOptions)
instance.register(cors, {
origin: ['example.com']
})

instance.get('/route1', (req, reply) => {
Expand Down

0 comments on commit 62c3b47

Please sign in to comment.