Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit addae98

Browse files
authored
feat: Update deps (#156)
This release comes with an updated version of DOM Testing Library – make sure to check their changelog to see what's new!
1 parent 76cdc70 commit addae98

File tree

18 files changed

+4286
-5456
lines changed

18 files changed

+4286
-5456
lines changed

‎.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@ module.exports = {
88
rules: {
99
'no-console': 'off',
1010
'import/no-unresolved': 'off',
11+
12+
'testing-library/no-dom-import': 'off',
13+
'testing-library/prefer-screen-queries': 'off',
14+
'testing-library/no-manual-cleanup': 'off',
1115
},
1216
}

‎.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ assignees: ''
4343
Relevant code or config (if any)
4444

4545
```javascript
46+
4647
```
4748

4849
**Additional context**

‎package-lock.json

Lines changed: 4230 additions & 5415 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,35 +40,35 @@
4040
"author": "Daniel Cook",
4141
"license": "MIT",
4242
"dependencies": {
43-
"@babel/runtime": "^7.9.6",
44-
"@testing-library/dom": "^7.5.7",
45-
"@types/testing-library__vue": "^2.0.1",
46-
"@vue/test-utils": "^1.0.3"
43+
"@babel/runtime": "^7.11.2",
44+
"@testing-library/dom": "^7.24.3",
45+
"@types/testing-library__vue": "^5.0.0",
46+
"@vue/test-utils": "^1.1.0"
4747
},
4848
"devDependencies": {
49-
"@babel/plugin-transform-runtime": "^7.9.6",
50-
"@testing-library/jest-dom": "^5.7.0",
49+
"@babel/plugin-transform-runtime": "^7.11.5",
50+
"@testing-library/jest-dom": "^5.11.4",
5151
"apollo-boost": "^0.4.9",
5252
"apollo-cache-inmemory": "^1.6.6",
53-
"axios": "^0.19.2",
53+
"axios": "^0.20.0",
5454
"eslint-plugin-vue": "^6.2.2",
55-
"graphql": "^15.0.0",
56-
"graphql-tag": "^2.10.3",
55+
"graphql": "^15.3.0",
56+
"graphql-tag": "^2.11.0",
5757
"isomorphic-unfetch": "^3.0.0",
5858
"jest-serializer-vue": "^2.0.2",
59-
"kcd-scripts": "^5.11.1",
59+
"kcd-scripts": "^6.5.1",
6060
"lodash.merge": "^4.6.2",
61-
"msw": "^0.20.5",
61+
"msw": "^0.21.2",
6262
"portal-vue": "^2.1.7",
6363
"vee-validate": "^2.2.15",
64-
"vue": "^2.6.11",
65-
"vue-apollo": "^3.0.3",
66-
"vue-i18n": "^8.17.6",
67-
"vue-jest": "^4.0.0-beta.2",
68-
"vue-router": "^3.1.6",
69-
"vue-template-compiler": "^2.6.11",
70-
"vuetify": "^2.2.28",
71-
"vuex": "^3.4.0"
64+
"vue": "^2.6.12",
65+
"vue-apollo": "^3.0.4",
66+
"vue-i18n": "^8.21.1",
67+
"vue-jest": "^4.0.0-rc.0",
68+
"vue-router": "^3.4.5",
69+
"vue-template-compiler": "^2.6.12",
70+
"vuetify": "^2.3.10",
71+
"vuex": "^3.5.1"
7272
},
7373
"peerDependencies": {
7474
"vue": "^2.6.10",

‎src/__tests__/axios-mock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ test('mocks an API call when load-greeting is clicked', async () => {
1616

1717
expect(axiosMock.get).toHaveBeenCalledTimes(1)
1818
expect(axiosMock.get).toHaveBeenCalledWith('/greeting')
19-
getByText('hello there')
19+
expect(getByText('hello there')).toBeInTheDocument()
2020

2121
// You can render component snapshots by using html(). However, bear in mind
2222
// that Snapshot Testing should not be treated as a replacement for regular

‎src/__tests__/cleanup-throw.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ test('cleanup re-throws errors from async lifecycle hooks', async () => {
55
const err = new Error('foo')
66
render({
77
async mounted() {
8-
await new Promise((resolve, reject) => reject(err))
8+
await new Promise((resolve, reject) => {
9+
reject(err)
10+
})
911
},
1012
template: `<h1>Hello World</h1>`,
1113
})

‎src/__tests__/debug.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable testing-library/no-debug */
12
import {render} from '@testing-library/vue'
23
import HelloWorld from './components/HelloWorld'
34

‎src/__tests__/directive.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import Directive from './components/Directive'
88
test('Component with a custom directive', () => {
99
// Do not forget to add the new custom directive to the render function as
1010
// the third parameter.
11-
const {queryByText} = render(Directive, {}, vue =>
11+
const {queryByText, getByText} = render(Directive, {}, vue =>
1212
vue.directive('uppercase', uppercaseDirective),
1313
)
1414

1515
// Test that the text in lower case does not appear in the DOM
1616
expect(queryByText('example text')).not.toBeInTheDocument()
1717

1818
// Test that the text in upper case does appear in the DOM thanks to the directive
19-
expect(queryByText('EXAMPLE TEXT')).toBeInTheDocument()
19+
expect(getByText('EXAMPLE TEXT')).toBeInTheDocument()
2020
})

‎src/__tests__/disappearance.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test('waits for the data to be loaded', async () => {
66
const {getByText, queryByText, queryByTestId} = render(Disappearance)
77

88
// Assert initial state
9-
getByText('Loading...')
9+
expect(getByText('Loading...')).toBeInTheDocument()
1010
expect(queryByText(/Loadedthismessage/)).not.toBeInTheDocument()
1111

1212
// Following line reads as follows:

‎src/__tests__/form.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ test('Review form submits', async () => {
3737
const initiallySelectedInput = getByLabelText('Awful')
3838
const ratingSelect = getByLabelText('Wonderful')
3939

40-
expect(initiallySelectedInput.checked).toBe(true)
41-
expect(ratingSelect.checked).toBe(false)
40+
expect(initiallySelectedInput).toBeChecked()
41+
expect(ratingSelect).not.toBeChecked()
4242

4343
await fireEvent.update(ratingSelect)
4444

45-
expect(ratingSelect.checked).toBe(true)
46-
expect(initiallySelectedInput.checked).toBe(false)
45+
expect(ratingSelect).toBeChecked()
46+
expect(initiallySelectedInput).not.toBeChecked()
4747

4848
// Get the Input element by its implicit ARIA role.
4949
const recommendInput = getByRole('checkbox')
5050

51-
expect(recommendInput.checked).toBe(false)
51+
expect(recommendInput).not.toBeChecked()
5252
await fireEvent.update(recommendInput)
53-
expect(recommendInput.checked).toBe(true)
53+
expect(recommendInput).toBeChecked()
5454

5555
// Make sure the submit button is enabled.
5656
expect(submitButton).toBeEnabled()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /