Skip to content

Commit

Permalink
increase coverage (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
KiraPC authored Apr 25, 2021
1 parent 582684e commit 31c97a7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/bundlers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ test('support faux modules', (t) => {
t.end()
})

test('support faux modules does not override existing default field in babel module', (t) => {
const module = {
default: (fastify, opts, next) => next()
}

module.default.default = 'Existing default field'

const plugin = fp(module)

t.equal(plugin.default, 'Existing default field')
t.end()
})

test('support ts named imports', (t) => {
const plugin = fp((fastify, opts, next) => {
next()
Expand Down

0 comments on commit 31c97a7

Please sign in to comment.