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

feat(vite-plugin-angular): add snapshot testing support for vitest #678

Merged

Conversation

Tenessy
Copy link
Contributor

@Tenessy Tenessy commented Sep 30, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Which package are you modifying?

  • vite-plugin-angular
  • vite-plugin-nitro
  • astro-angular
  • create-analog
  • router
  • platform
  • content
  • nx-plugin
  • trpc

What is the current behavior?

Closes #613

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

To test Angular fixture component you need to add environment: 'jsdom' in vite.config.ts file or add
@vitest-environment jsdom in top of your test file. https://vitest.dev/config/#environment

Other information

[optional] What gif best describes this PR or how it makes you feel?

@netlify
Copy link

netlify bot commented Sep 30, 2023

Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit 6a831cd
🔍 Latest deploy log https://app.netlify.com/sites/analog-app/deploys/65186c39b45e510008e845fe
😎 Deploy Preview https://deploy-preview-678--analog-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Sep 30, 2023

Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit 6a831cd
🔍 Latest deploy log https://app.netlify.com/sites/analog-blog/deploys/65186c3981342000082443a2
😎 Deploy Preview https://deploy-preview-678--analog-blog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Sep 30, 2023

Deploy Preview for analog-docs failed.

Name Link
🔨 Latest commit 6a831cd
🔍 Latest deploy log https://app.netlify.com/sites/analog-docs/deploys/65186c399b3ee00008ecf6fb

@Tenessy Tenessy changed the title Feature add snapshot support for vitest Feature(vite-plugin-angular): add snapshot support for vitest Sep 30, 2023
@brandonroberts brandonroberts changed the title Feature(vite-plugin-angular): add snapshot support for vitest feature(vite-plugin-angular): add snapshot support for vitest Oct 1, 2023
@brandonroberts
Copy link
Member

@Tenessy awesome! Do the _ngcontent attributes need to be kept in the output?

@brandonroberts brandonroberts changed the title feature(vite-plugin-angular): add snapshot support for vitest feat(vite-plugin-angular): add snapshot support for vitest Oct 1, 2023
@Tenessy
Copy link
Contributor Author

Tenessy commented Oct 1, 2023

@brandonroberts I asked myself the same question but i think it can be useful to know if ViewEncapsulation.None is actived or not on the component

@brandonroberts brandonroberts changed the title feat(vite-plugin-angular): add snapshot support for vitest feat(vite-plugin-angular): add snapshot testing support for vitest Oct 2, 2023
@brandonroberts brandonroberts merged commit 54166d7 into analogjs:main Oct 2, 2023
15 of 19 checks passed
@brandonroberts
Copy link
Member

Awesome! @allcontributors add @Tenessy for code,test

@allcontributors
Copy link
Contributor

@brandonroberts

I've put up a pull request to add @Tenessy! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: add snapshot support for Vitest
2 participants