Skip to content

Commit 9599683

Browse files
committed
Add test to increase coverage
1 parent 3b19dd3 commit 9599683

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/__tests__/fire-event.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,18 @@ test.each(['input', 'change'])(
206206
},
207207
)
208208

209+
test('does not warn when disabled via env var', async () => {
210+
process.env.VTL_SKIP_WARN_EVENT_UPDATE = 'true'
211+
212+
const {getByTestId} = render({
213+
template: `<input type="text" data-testid="test-update" />`,
214+
})
215+
216+
await fireEvent.input(getByTestId('test-update'), 'hello')
217+
218+
expect(console.warn).not.toHaveBeenCalled()
219+
})
220+
209221
test('fireEvent.update does not trigger warning messages', async () => {
210222
const {getByTestId} = render({
211223
template: `<input type="text" data-testid="test-update" />`,

src/__tests__/vue-apollo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import '@testing-library/jest-dom'
22
import fetch from 'isomorphic-unfetch'
3-
import {render, fireEvent, screen} from '..'
43
import {DefaultApolloClient} from '@vue/apollo-composable'
54
import ApolloClient from 'apollo-boost'
65
import {setupServer} from 'msw/node'
76
import {graphql} from 'msw'
7+
import {render, fireEvent, screen} from '..'
88
import Component from './components/VueApollo.vue'
99

1010
// Since vue-apollo doesn't provide a MockProvider for Vue,

0 commit comments

Comments
 (0)