question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use this with unit tests?

See original GitHub issue

As this is a vite plugin it won’t be utilized when running unit test and all components won’t be transformed. Is there any trick to get this working with the vue-test-utils / jest?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:20
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
eratio08commented, Dec 28, 2021

So the simple answer to this seems to be now: Use vitest for testing!

3reactions
marktnoonancommented, Jul 29, 2021

@husayt Cypress has a component testing solution for Vue now that’s built on top of Vue Test Utils + Vite - it came out in the last couple of major Cypress versions. This might be what @antfu is referring to. I haven’t tested it with this package but I’ve been using it where I would have used jest component tests in the past: https://www.cypress.io/blog/2021/04/06/getting-start-with-cypress-component-testing-vue-2-3/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unit Testing Tutorial: 6 Best Practices to Get Up To Speed
1. Arrange, Act, Assert · 2. One Assert Per Test Method · 3. Avoid Test Interdependence · 4. Keep It Short, Sweet, and...
Read more >
Unit Tests, How to Write Testable Code, and Why It Matters
A typical unit test contains 3 phases: First, it initializes a small piece of an application it wants to test (also known as...
Read more >
Unit Testing Tutorial – What is, Types & Test Example - Guru99
Unit Test cases should be independent. · Test only one code at a time. · Follow clear and consistent naming conventions for your...
Read more >
Getting Started With Testing in Python
On the context menu, choose the run command for unittest . For example, choose Run 'Unittests in my Tests…'. This will execute unittest...
Read more >
unittest — Unit testing framework — Python 3.11.1 ...
A test runner is a component which orchestrates the execution of tests and provides the outcome to the user. The runner may use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found