Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flybayer/vue-mock-test-bug
https://github.com/flybayer/vue-mock-test-bug
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/flybayer/vue-mock-test-bug
- Owner: flybayer
- Created: 2017-10-24T19:32:41.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-24T19:32:52.000Z (about 7 years ago)
- Last Synced: 2024-12-10T19:53:05.220Z (13 days ago)
- Language: JavaScript
- Size: 65.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## This repo reproduces a bug with vue-test-utils where `mocks` doesn't work for child components
`src/App.vue` and `src/components/HelloWorld.vue` both depend on the `$mq` global from `vue-match-media` which is installed in `src/main.js`
The test mock in `src/App.test.js` works for `App.vue` but not for `` as a child of `App.vue`
``` bash
# install dependencies
npm install# see failing test (src/App.test.js)
npm test
```