diff --git a/test/unit/specs/components/post_status_form.spec.js b/test/unit/specs/components/post_status_form.spec.js index 03c0ec8b9..f89102504 100644 --- a/test/unit/specs/components/post_status_form.spec.js +++ b/test/unit/specs/components/post_status_form.spec.js @@ -80,8 +80,8 @@ describe('PostStatusForm', () => { expect(wrapper.vm.refId).to.equal('status-1') expect(wrapper.vm.quotable).to.equal(true) expect(wrapper.vm.inReplyToStatusId).to.equal('status-1') - expect(wrapper.vm.newStatus.quote).to.eql(null) - expect(wrapper.vm.newStatus.poll).to.eql(null) + expect(wrapper.vm.newStatus.quote).to.be.null + expect(wrapper.vm.newStatus.poll).to.be.null expect(wrapper.vm.newStatus.spoilerText).to.eql('') expect(wrapper.vm.newStatus.mentions).to.eql('@replied') expect(wrapper.vm.newStatus.status).to.eql('@replied ') @@ -101,8 +101,8 @@ describe('PostStatusForm', () => { expect(wrapper.vm.statusType).to.equal('reply') expect(wrapper.vm.isReply).to.equal(true) expect(wrapper.vm.quotable).to.equal(false) - expect(wrapper.vm.newStatus.quote).to.eql(null) - expect(wrapper.vm.newStatus.poll).to.eql(null) + expect(wrapper.vm.newStatus.quote).to.be.null + expect(wrapper.vm.newStatus.poll).to.be.null expect(wrapper.vm.newStatus.spoilerText).to.eql('re: subject') expect(wrapper.vm.newStatus.mentions).to.eql('@replied') expect(wrapper.vm.newStatus.status).to.eql('@replied ') @@ -114,9 +114,9 @@ describe('PostStatusForm', () => { expect(wrapper.vm.postingOptions.sensitive).to.eql(false) expect(wrapper.vm.postingOptions.media).to.eql([]) expect(wrapper.vm.postingOptions.inReplyToStatusId).to.eql('status-2') - expect(wrapper.vm.postingOptions.quoteId).to.eql(null) + expect(wrapper.vm.postingOptions.quoteId).to.be.null expect(wrapper.vm.postingOptions.contentType).to.eql('text/plain') - expect(wrapper.vm.postingOptions.poll).to.eql(null) + expect(wrapper.vm.postingOptions.poll).to.be.null }) it('Forces direct mode when replying to a DM, mastodon style subject handling', () => { @@ -139,8 +139,8 @@ describe('PostStatusForm', () => { expect(wrapper.vm.statusType).to.equal('reply') expect(wrapper.vm.isReply).to.equal(true) expect(wrapper.vm.quotable).to.equal(false) - expect(wrapper.vm.newStatus.quote).to.eql(null) - expect(wrapper.vm.newStatus.poll).to.eql(null) + expect(wrapper.vm.newStatus.quote).to.be.null + expect(wrapper.vm.newStatus.poll).to.be.null expect(wrapper.vm.newStatus.spoilerText).to.eql('subject') expect(wrapper.vm.newStatus.mentions).to.eql('@replied') expect(wrapper.vm.newStatus.status).to.eql('@replied ') @@ -207,7 +207,7 @@ describe('PostStatusForm', () => { wrapper.vm.quoteThreadToggled = true wrapper.vm.quoteThreadToggled = false - expect(wrapper.vm.newStatus.quote).to.eql(null) + expect(wrapper.vm.newStatus.quote).to.be.null }) it('Initializes and reset quote when toggling quote attachment', () => { @@ -228,7 +228,7 @@ describe('PostStatusForm', () => { url: '', }) wrapper.vm.toggleQuoteForm() - expect(wrapper.vm.newStatus.quote).to.eql(null) + expect(wrapper.vm.newStatus.quote).to.be.null }) it('Status editing', () => { diff --git a/test/unit/specs/lib/persisted_state.spec.js b/test/unit/specs/lib/persisted_state.spec.js index de7d92bd8..c37d0f99f 100644 --- a/test/unit/specs/lib/persisted_state.spec.js +++ b/test/unit/specs/lib/persisted_state.spec.js @@ -187,7 +187,7 @@ describe('piniaPersistPlugin', () => { const test = useTestStore() test.$patch({ a: 3 }) - expect(await mockStorage.getItem('pinia-local-test')).to.eql(undefined) + expect(await mockStorage.getItem('pinia-local-test')).to.be.undefined // NOTE: it should not even have tried to save, because the subscribe function // is called only after loading the initial state. expect(mockStorage.setItem).not.toHaveBeenCalled() diff --git a/test/unit/specs/modules/users.spec.js b/test/unit/specs/modules/users.spec.js index c07f817d8..1b33f8c4e 100644 --- a/test/unit/specs/modules/users.spec.js +++ b/test/unit/specs/modules/users.spec.js @@ -68,7 +68,7 @@ describe('The users module', () => { }, } const name = 'Guy' - expect(getters.findUser(state)(name)).to.eql(undefined) + expect(getters.findUser(state)(name)).to.be.undefined }) it('returns user with matching id', () => { @@ -114,7 +114,7 @@ describe('The users module', () => { }, } const id = '1' - expect(getters.findUserByName(state)(id)).to.eql(undefined) + expect(getters.findUserByName(state)(id)).to.be.undefined }) }) }) diff --git a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js index da3f88636..c68c832a0 100644 --- a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js +++ b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js @@ -101,7 +101,7 @@ describe('API Entities normalizer', () => { describe('Mastoapi preprocessing and converting', () => { it("doesn't blow up", () => { const parsed = mastoapidata.map(parseStatus) - expect(parsed.length).to.eq(mastoapidata.length) + expect(parsed).to.have.length(mastoapidata.length) }) it('processes repeats correctly', () => {