Skip to content

Commit

Permalink
Initial test config
Browse files Browse the repository at this point in the history
  • Loading branch information
mlhaufe committed Oct 28, 2024
1 parent a562436 commit ba7f4ba
Show file tree
Hide file tree
Showing 7 changed files with 800 additions and 14 deletions.
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"editor.formatOnSave": true,
"git.pruneOnFetch": true
"git.pruneOnFetch": true,
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"*.test.ts": "${capture}.ts",
"*.vue": "${capture}.test.ts"
}
}
10 changes: 10 additions & 0 deletions components/TopNavigation.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { it, expect, describe } from 'vitest';
import { mountSuspended } from '@nuxt/test-utils/runtime'
import TopNavigation from './TopNavigation.vue';

describe('TopNavigation', () => {
it('should render the title', async () => {
const component = await mountSuspended(TopNavigation);
expect(component.html()).toContain('Home');
});
});
9 changes: 5 additions & 4 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ export default defineNuxtConfig({
// The latest version (^1.5.0) is needed due to https://github.com/nuxt/devtools/issues/723
// It looks like this won't be integrated into Nuxt until after 3.14.0
'@nuxt/devtools',
"nuxt-primevue",
"@vite-pwa/nuxt",
"@sidebase/nuxt-auth",
"nuxt-security"
'nuxt-primevue',
'@vite-pwa/nuxt',
'@sidebase/nuxt-auth',
'nuxt-security',
'@nuxt/test-utils/module',
],
runtimeConfig: {
// The private keys which are only available within server-side
Expand Down
Loading

0 comments on commit ba7f4ba

Please sign in to comment.