[Documentation][3.0.0-beta.1] Unit testing
See original GitHub issueEnvironment
Vuetify Version: 3.0.0-alpha.12 Vue Version: 3.2.13 Browsers: Chrome 98.0.4758.102 OS: Windows 10
Steps to reproduce
git clone https://github.com/governance-foundation/template-electron-vuex-vuetify.git cd template-electron-vuex-vuetify npm install npm run test:unit
Expected Behavior
unit test pass
Actual Behavior
FAIL src/components/__tests__/HelloWorld.spec.ts [ src/components/__tests__/HelloWorld.spec.ts ]
ReferenceError: CSS is not defined
❯ node_modules/vuetify/lib/util/globals.mjs:7:52
5| export const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
6| export const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
7| export const SUPPORTS_FOCUS_VISIBLE = IN_BROWSER && CSS.supports('selector(:focus-visible)');
| ^
8| //# sourceMappingURL=globals.mjs.map
❯ async node_modules/vuetify/lib/util/index.mjs:19:31
❯ async node_modules/vuetify/lib/composables/tag.mjs:2:31
❯ async node_modules/vuetify/lib/components/VGrid/VContainer.mjs:7:31
Reproduction Link
https://github.com/governance-foundation/template-electron-vuex-vuetify
Other comments
I have globals set, and setup files mocking global.CSS.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:42 (11 by maintainers)
Top Results From Across the Web
dockest 3.0.0-beta.1-292b5cc vulnerabilities | Snyk
dockest@3.0.0-beta.1-292b5cc vulnerabilities. Dockest is an integration testing tool aimed at alleviating the process of evaluating unit tests whilst ...
Read more >dockest - npm
Dockest is an integration testing tool aimed at alleviating the process of evaluating unit tests whilst running multi-container Docker applications.
Read more >Unit testing
In this guide we will see how you can run basic unit tests for a Strapi application using a testing framework. TIP. In...
Read more >unittest — Unit testing framework — Python 3.11.1 ...
The unittest unit testing framework was originally inspired by JUnit and has a similar flavor as major unit testing frameworks in other languages....
Read more >Welcome to istSOS3's documentation
IstSOS is an OGC SOS 2.0 server implementation written in Python. Contents: System Types classification · Point TimeSeries Observation · Mobile TimeSeries ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Why is this closed if the issue is not resolved? 🤔 Still no documentation on unit testing…
I finally managed to pass the tests. The last step is add this on
vite.config.js
And
vuetify.config.js
has the css support false:I leave my repo reproducing the problem and the last commit solving it, so it can help someone. https://github.com/mpont91/vue3-vuetify-tests