Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

284 add testing #411

Merged
merged 3 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"EditorConfig.EditorConfig",
"github.vscode-github-actions",
"AlexShen.classdiagram-ts",
"ms-azuretools.vscode-bicep"
"ms-azuretools.vscode-bicep",
"vitest.explorer",
"kingwl.vscode-vitest-runner"
]
}
}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/azure-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ jobs:
run: npm run build
- name: Generate PWA Assets
run: npm run generate-pwa-assets
# - name: Run Unit Tests
# run: npm run test
- name: Run Unit Tests
run: npm run test
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ jobs:
run: npm run build
- name: Generate PWA Assets
run: npm run generate-pwa-assets
# - name: Run Unit Tests
# run: npm run test
- name: Run Unit Tests
run: npm run test
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": {
"*.ts": "${capture}.test.ts",
"*.vue": "${capture}.test.ts"
}
}
10 changes: 10 additions & 0 deletions components/TopNavigation.test.ts.disabled
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