1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 10:38:54 +08:00

use .have.lengthOf in assertions

This commit is contained in:
lana-k
2021-01-12 21:04:13 +01:00
parent 11721590c1
commit 33a9b261bf
3 changed files with 14 additions and 14 deletions

View File

@@ -30,10 +30,10 @@ describe('CheckBox', () => {
it('emits event on click', async () => {
const wrapper = shallowMount(CheckBox)
await wrapper.trigger('click')
expect(wrapper.emitted().click.length).to.equal(1)
expect(wrapper.emitted().click).to.have.lengthOf(1)
expect(wrapper.emitted().click[0]).to.eql([true])
await wrapper.trigger('click')
expect(wrapper.emitted().click.length).to.equal(2)
expect(wrapper.emitted().click).to.have.lengthOf(2)
expect(wrapper.emitted().click[1]).to.eql([false])
})
})