Skip to content

Commit

Permalink
chore(#693): update druxt-entity tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Aug 13, 2024
1 parent 6de5ac3 commit deedb4d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 29 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ exports[`DruxtEntity missing schema 1`] = `
<option>DruxtEntityFileFile</option>
<option>DruxtEntityFile</option>
<option>DruxtEntityDefault</option>
</select> <button>
Create
</button></div>
</select></div>
<details>
<summary>JSON:API resource</summary><pre><code>{
\\"type\\": \\"file--file\\",
Expand Down
26 changes: 26 additions & 0 deletions packages/entity/test/nuxt/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import DruxtEntityNuxtModule from '../../src/nuxt'

// jest.mock('../src/nuxtStorybook')

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 = {
druxt: {},
modules: [],
}
await DruxtEntityNuxtModule.setup({}, nuxtMock)
})
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import DruxtEntityStorybook from '../src/nuxtStorybook'
import DruxtEntityStorybook from '../../src/nuxt/storybook'

jest.mock('axios')

Expand Down
25 changes: 0 additions & 25 deletions packages/entity/test/nuxtModule.test.js

This file was deleted.

0 comments on commit deedb4d

Please sign in to comment.