Please confirm that you have searched existing issues in the repo
Yes, I have searched the existing issues
Any related issues?
No
Environment: Win 11
MarkBind version: 5.3.3
Describe the bug and the steps to reproduce it
Several vue-component tests are erroneous.
See:
|
test('with no-background option does not affect background-color', () => { |
|
const wrapper = mount(Box, { |
|
propsData: { |
|
noBackground: true, |
|
backgroundColor: 'yellow', |
|
}, |
|
}); |
|
const boxYellowBackground = mount(Box, { |
|
propsData: { |
|
backgroundColor: 'yellow', |
|
}, |
|
}); |
|
expect(wrapper).toEqual(boxYellowBackground); |
|
}); |
Actually, only the wrapper is being compared. So the test is not really testing anything. For instance, you could even mount a different component and the test would pass.

Other things:
- If facing issues getting the jest to compile, try removing your jest cache.
npx jest --clearCache. Faced this issue, but could be because I have been swapping configurations between Vue 2 and Vue 3.
- To run individual tests, the path (e.g.
npm test ./src/__tests__/Box.spec.js needs to be delimited by / not \. For case of autocomplete path on windows. (Bc. of default test regex).
Other components:
Breadcrumbs
|
const SITENAV_START = ` |
|
<nav id="site-nav"> |
|
<div class="nav-component slim-scroll> |
|
<div class="site-nav-root"> |
|
<ul class="site-nav-list site-nav-list-root"> |
|
`; |
On line 7 the class is actually not closed.
Popovers
Some of the snapshot tests for popovers don't really seem to test functionality rather than just testing on the surface given the stubs.
Please confirm that you have searched existing issues in the repo
Yes, I have searched the existing issues
Any related issues?
No
Environment: Win 11
MarkBind version: 5.3.3
Describe the bug and the steps to reproduce it
Several vue-component tests are erroneous.
See:
markbind/packages/vue-components/src/__tests__/Box.spec.js
Lines 227 to 240 in 008aa1d
Actually, only the wrapper is being compared. So the test is not really testing anything. For instance, you could even mount a different component and the test would pass.
Other things:
npx jest --clearCache. Faced this issue, but could be because I have been swapping configurations between Vue 2 and Vue 3.npm test ./src/__tests__/Box.spec.jsneeds to be delimited by/not\. For case of autocomplete path on windows. (Bc. of default test regex).Other components:
Breadcrumbs
markbind/packages/vue-components/src/__tests__/Breadcrumb.spec.js
Lines 5 to 10 in aa1fdbb
On line 7 the class is actually not closed.
Popovers
Some of the snapshot tests for popovers don't really seem to test functionality rather than just testing on the surface given the stubs.