Skip to content

Commit

Permalink
chore(#693): update druxt-breadcrumb tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Aug 13, 2024
1 parent 9ff5ade commit 6de5ac3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
24 changes: 24 additions & 0 deletions packages/breadcrumb/test/nuxt/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import DruxtBreadcrumbModule from '../../src/nuxt'

jest.mock('@nuxt/kit', () => ({
defineNuxtModule: (module) => module,
installModule: jest.fn(),
}))

const nuxtMock = {
hook: jest.fn((hook, fn) => {
const arg = {
'components:dirs': [],
'storybook:config': { stories: [] }
}
return fn(arg[hook])
}),
}

test('Nuxt module', async () => {
nuxtMock.options = {
buildDir: 'build',
druxt: {}
}
await DruxtBreadcrumbModule.setup({}, nuxtMock)
})
23 changes: 0 additions & 23 deletions packages/breadcrumb/test/nuxtModule.test.js

This file was deleted.

0 comments on commit 6de5ac3

Please sign in to comment.