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

fix(vite-plugin-angular): add inline deps for angular testing library #1467

Merged
merged 2 commits into from
Dec 4, 2024
Merged
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
11 changes: 11 additions & 0 deletions packages/vite-plugin-angular/src/lib/angular-vitest-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { Plugin, transformWithEsbuild, UserConfig } from 'vite';

/**
* Sets up test config for Vitest
* and downlevels any dependencies that use
* async/await to support zone.js testing
* and tests w/fakeAsync
*/
export function angularVitestPlugin(): Plugin {
return {
name: '@analogjs/vitest-angular-esm-plugin',
Expand All @@ -19,9 +25,14 @@ export function angularVitestPlugin(): Plugin {
server: {
deps: {
inline: [
'@angular/common',
'@angular/core',
'@angular/router',
'@angular/platform-browser',
'@angular/material',
'@analogjs/router',
'@analogjs/vitest-angular/setup-zone',
'@testing-library/angular',
],
},
},
Expand Down
Loading