Skip to content

Bump DTL major version #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
module.exports = {
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: false,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: false,
jsxBracketSameLine: false,
proseWrap: 'always',
}
module.exports = require('kcd-scripts/prettier')
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ cache:
notifications:
email: false
node_js:
- '8'
- '10'
- '12'
- 10.18
- 12
- node
install: npm install
script: npm run validate
after_success: kcd-scripts travis-after-success
Expand Down
176 changes: 147 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"validate": "kcd-scripts validate",
"setup": "npm install && npm run validate -s"
},
"engines": {
"node": ">10.18"
},
"files": [
"dist",
"cleanup-after-each.js"
Expand All @@ -38,7 +41,7 @@
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.8.4",
"@testing-library/dom": "^6.13.0",
"@testing-library/dom": "^7.0.0-beta.4",
"@types/testing-library__vue": "*",
"@vue/test-utils": "^1.0.0-beta.31"
},
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/fire-event.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ test('triggers dblclick on doubleClick', async () => {

const {getByRole} = render({
render(h) {
return h('input', {
return h('button', {
on: {dblclick: spy},
})
},
})

const elem = getByRole('textbox')
const elem = getByRole('button')

await fireEvent.doubleClick(elem)
expect(spy).toHaveBeenCalledTimes(1)
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/stopwatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test('updates component state', async () => {
getByText('Stop')

// Wait for one tick of the event loop.
await wait()
await wait(() => {})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// Stop the timer.
await fireEvent.click(startButton)
Expand All @@ -38,7 +38,7 @@ test('unmounts a component', async () => {

expect(isUnmounted()).toBe(true)

await wait()
await wait(() => {})

expect(console.error).not.toHaveBeenCalled()
})
6 changes: 3 additions & 3 deletions src/vue-testing-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function render(
emitted: () => wrapper.emitted(),
updateProps: _ => {
wrapper.setProps(_)
return wait()
return wait(() => {})
},
...getQueriesForElement(baseElement),
}
Expand Down Expand Up @@ -107,13 +107,13 @@ function cleanupAtWrapper(wrapper) {
// More info: https://vuejs.org/v2/guide/reactivity.html#Async-Update-Queue
async function fireEvent(...args) {
dtlFireEvent(...args)
await wait()
await wait(() => {})
}

Object.keys(dtlFireEvent).forEach(key => {
fireEvent[key] = async (...args) => {
dtlFireEvent[key](...args)
await wait()
await wait(() => {})
}
})

Expand Down