Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: testing-library/vue-testing-library
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.5.1
Choose a base ref
...
head repository: testing-library/vue-testing-library
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.6.0
Choose a head ref

Commits on Oct 31, 2020

  1. test(ci): fix travis

    afontcu committed Oct 31, 2020
    Copy the full SHA
    d356049 View commit details

Commits on Nov 1, 2020

  1. Copy the full SHA
    920dff2 View commit details

Commits on Nov 14, 2020

  1. chore: switch to github actions (#171)

    * chore: switch to github actions
    
    * chore: require await for events to fix eslint
    nickserv authored Nov 14, 2020
    Copy the full SHA
    8466f70 View commit details
  2. docs: Use @testing-library/jest-dom in README.md (#172)

    * Use `@testing-library/jest-dom` in README.md
    
    Instead of `jest-dom` which is now deprecated
    
    * Missed a spot
    vdsabev authored Nov 14, 2020
    Copy the full SHA
    53ff893 View commit details
  3. feat: Move types from DefinitelyTyped into this repo (#165)

    * Add required dependencies
    
    * Add types
    
    * Update readme
    
    * Bump deps and fix build and eslint to fix node 15
    afontcu authored Nov 14, 2020
    Copy the full SHA
    dbcf740 View commit details

Commits on Nov 15, 2020

  1. fix: allow multiple calling of updateProps (#170)

    * Changed updateProps to return the Promise created from
    wrapper.setProps.
    * Updated the `updateProps` test to make sure the function can be called
    multiple times without producing errors.
    ITenthusiasm authored Nov 15, 2020
    Copy the full SHA
    95cc445 View commit details
  2. Copy the full SHA
    04932ce View commit details

Commits on Nov 17, 2020

  1. feat: Warn using fireEvent.input() or .change() and suggest fireEvent…

    ….update() (#166)
    
    * Add warning message to fireEvent input and change when called directly #83
    
    * Add user event test case
    
    * Reword warning message to include used event key
    
    * Fix template literal for warning messages
    jhack32 authored Nov 17, 2020
    Copy the full SHA
    8871d2f View commit details

Commits on Nov 20, 2020

  1. Copy the full SHA
    a5bd6cc View commit details

Commits on Nov 22, 2020

  1. Copy the full SHA
    8ddeac6 View commit details
  2. feat: Add env to turn off fireEvent.update warning (#181)

    * add env to turn off warning: `VTL_SKIP_WARN_EVENT_UPDATE`
    JeromeDeLeon authored Nov 22, 2020
    Copy the full SHA
    4376e64 View commit details

Commits on Nov 24, 2020

  1. fix: Make fireEvent.update work with lazy modifier (#183)

    - switched to use change event if lazy modifier is found on element
    - updated form unit test to test lazy input and textarea
    
    Co-authored-by: Jesse Knowles <jknowles@westjet.com>
    kinoli and Jesse Knowles authored Nov 24, 2020
    Copy the full SHA
    853d998 View commit details
  2. Copy the full SHA
    a051013 View commit details
  3. feat: Add support for input file on fireEvent.update (#179)

    * add input file fail test
    
    * fix incorrect render
    
    * add input file to update fireEvent
    
    * Update based on suggestion
    
    Co-authored-by: Adrià Fontcuberta <afontcu@gmail.com>
    JeromeDeLeon and afontcu authored Nov 24, 2020
    Copy the full SHA
    b762198 View commit details

Commits on Nov 25, 2020

  1. fix: Add cleanup type (#186)

    ryotah authored Nov 25, 2020
    Copy the full SHA
    75e0111 View commit details

Commits on Nov 28, 2020

  1. Copy the full SHA
    3dbb1c2 View commit details
  2. test: remove await from userEvent usage (#182)

    * test: remove await from userEvent usage
    
    * test: fix test failure with waitFor
    nickserv authored Nov 28, 2020
    Copy the full SHA
    2312e18 View commit details

Commits on Jan 14, 2021

  1. docs: Replace queryBy* with getBy* in examples (#203)

    Co-authored-by: sangil yun <si.yun@mxncommerce.com>
    SangilYun and SangilYun authored Jan 14, 2021
    Copy the full SHA
    84e549e View commit details

Commits on Jan 20, 2021

  1. Copy the full SHA
    d05b77d View commit details

Commits on Feb 17, 2021

  1. chore: Cleanup structure (#209)

    * Split index into focused files
    
    * Update deps
    
    * Add missing quotes
    afontcu authored Feb 17, 2021
    Copy the full SHA
    7bef579 View commit details

Commits on Mar 31, 2021

  1. chore(lint): disable unbound-method rule (#214)

    * chore(lint): disable unbound-method rule
    
    * change the order of the rules
    MatanBobi authored Mar 31, 2021
    Copy the full SHA
    a06815a View commit details
  2. fix(types): exclude tsconfig from types folder in publish flow (#213)

    Port of testing-library/react-testing-library#893
    
    Co-authored-by: Matan Borenkraout <Matanbobi@gmail.com>
    nickserv and MatanBobi authored Mar 31, 2021
    Copy the full SHA
    40caa97 View commit details

Commits on Apr 5, 2021

  1. Copy the full SHA
    9e11964 View commit details

Commits on May 8, 2021

  1. docs: fix vue-i18n example link (#227)

    Eric Bednarz authored May 8, 2021
    Copy the full SHA
    a5c0962 View commit details
  2. chore: add tests for Node 16 (#220)

    Co-authored-by: Adrià Fontcuberta <afontcu@gmail.com>
    MichaelDeBoey and afontcu authored May 8, 2021
    Copy the full SHA
    9f02670 View commit details

Commits on Jun 14, 2021

  1. Copy the full SHA
    920e509 View commit details
  2. chore: add editorconfig (#235)

    Co-authored-by: Adrià Fontcuberta <afontcu@gmail.com>
    Konstantin Epishev and afontcu authored Jun 14, 2021
    Copy the full SHA
    4efca8a View commit details

Commits on Jun 25, 2021

  1. feat: allow passing instantiated Vuex store (#232)

    * feat: allow passing instantiated Vuex store
    
    * Update types/index.d.ts
    
    Co-authored-by: Adrià Fontcuberta <afontcu@gmail.com>
    blimmer and afontcu authored Jun 25, 2021
    Copy the full SHA
    9d63d71 View commit details

Commits on Jun 29, 2021

  1. Copy the full SHA
    96c0c2d View commit details

Commits on Jul 6, 2021

  1. Copy the full SHA
    b028364 View commit details

Commits on Jul 13, 2021

  1. Copy the full SHA
    1ebc117 View commit details

Commits on Jul 18, 2021

  1. chore: rename proj. from master to main (#223)

    Co-authored-by: Nick McCurdy <nick@nickmccurdy.com>
    amitmiran137 and nickserv authored Jul 18, 2021
    Copy the full SHA
    eba2aed View commit details

Commits on Aug 1, 2021

  1. Copy the full SHA
    9d367e7 View commit details
  2. Copy the full SHA
    c25b1aa View commit details

Commits on Aug 6, 2021

  1. docs: update vue-i18n example url (#248)

    Andrew Luca authored Aug 6, 2021
    Copy the full SHA
    b16a06b View commit details

Commits on Sep 27, 2021

  1. chore: upgrade to Jest 27 (#251)

    * chore: upgrade to Jest 27
    
    * chore: replace vue-jest with vue2-jest for Jest 27
    
    * chore: fix lint error
    
    * chore: upgrade msw for bug fix
    
    * chore: update expected test error
    
    * chore: check for type errors based on Node version
    nickserv authored Sep 27, 2021
    Copy the full SHA
    a620424 View commit details

Commits on Jan 7, 2022

  1. docs: Update readme with typescript requirement (#236)

    Specific typescript version is required
    
    Co-authored-by: Adrià Fontcuberta <afontcu@gmail.com>
    sahbi-ktifa and afontcu authored Jan 7, 2022
    Copy the full SHA
    0971eb2 View commit details

Commits on Jan 21, 2022

  1. Update README.md

    afontcu authored Jan 21, 2022
    Copy the full SHA
    4608b37 View commit details

Commits on Mar 1, 2022

  1. Update README.md

    afontcu authored Mar 1, 2022
    Copy the full SHA
    4316bd3 View commit details

Commits on May 9, 2022

  1. Copy the full SHA
    181765f View commit details

Commits on Jun 8, 2022

  1. Merge branch 'next'

    afontcu committed Jun 8, 2022
    Copy the full SHA
    11348c1 View commit details
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -6,4 +6,4 @@ indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
insert_final_newline = true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ assignees: ''
<!-- Thanks for your interest in the project. We appreciate bugs filed and PRs submitted! -->

<!--
- For questions related to using the library, please join the Discord server (https://testing-library.com/discord) instead of filing an issue on GitHub.
- For questions related to using the library, please join the Discord server (https://discord.gg/testing-library) instead of filing an issue on GitHub.
- Please fill out this template with all the relevant information so we can
understand what's going on and fix the issue.
9 changes: 3 additions & 6 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ on:
branches:
[
'+([0-9])?(.{+([0-9]),x}).x',
'master',
'main',
'next',
'next-major',
'beta',
@@ -47,12 +47,9 @@ jobs:
runs-on: ubuntu-latest
if:
${{ github.repository == 'testing-library/vue-testing-library' &&
contains('refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha',
contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha',
github.ref) && github.event_name == 'push' }}
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.0

- name: ⬇️ Checkout repo
uses: actions/checkout@v2

@@ -76,7 +73,7 @@ jobs:
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'master',
'main',
'next',
'next-major',
{name: 'beta', prerelease: true},
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
height="80"
width="80"
alt="lizard"
src="https://raw.githubusercontent.com/testing-library/vue-testing-library/master/lizard.png"
src="https://raw.githubusercontent.com/testing-library/vue-testing-library/main/lizard.png"
/>
</a>

@@ -71,6 +71,13 @@ This library has `peerDependencies` listings for `Vue 3` and
You may also be interested in installing `jest-dom` so you can use [the custom
Jest matchers][jest-dom].

If you're using Vue 2, please install version 5 of the library:

```
npm install --save-dev @testing-library/vue@^5
```


## A basic example

```html
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/__tests__/components/Form.vue
Original file line number Diff line number Diff line change
@@ -58,7 +58,6 @@ export default {
methods: {
submit() {
if (this.submitDisabled) return
this.$emit('submit', {
title: this.title,
review: this.review,
44 changes: 22 additions & 22 deletions src/__tests__/components/NumberDisplay.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<template>
<span data-testid="number-display">{{ number }}</span>
<span data-testid="instance-id">{{ id }}</span>
</template>

<script>
let idCounter = 1
export default {
props: {
number: {
type: Number,
required: true,
},
},
data() {
return {
id: idCounter++,
}
},
}
</script>
<template>
<span data-testid="number-display">{{ number }}</span>
<span data-testid="instance-id">{{ id }}</span>
</template>

<script>
let idCounter = 1
export default {
props: {
number: {
type: Number,
required: true,
},
},
data() {
return {
id: idCounter++,
}
},
}
</script>
2 changes: 1 addition & 1 deletion src/__tests__/components/VueApollo/queries.js
Original file line number Diff line number Diff line change
@@ -15,4 +15,4 @@ export const updateUserMutation = gql`
email
}
}
`
`
2 changes: 1 addition & 1 deletion src/__tests__/disappearance.js
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ test('waits for the data to be loaded', async () => {

// Following line reads as follows:
// "Wait until element with text 'Loading...' is gone."
await waitForElementToBeRemoved(getByText('Loading...'))
await waitForElementToBeRemoved(queryByText('Loading...'))
// It is equivalent to:
//
// await waitFor(() => {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
@@ -43,7 +43,8 @@ interface VueTestingLibraryRenderOptions {
container?: Element
baseElement?: Element
}
export type RenderOptions = VueTestingLibraryRenderOptions & VueTestUtilsRenderOptions
export type RenderOptions = VueTestingLibraryRenderOptions &
VueTestUtilsRenderOptions

export function render(
TestComponent: any, // this makes me sad :sob: