From 4ef53e116e0914ea21e38139efd376465240b4e0 Mon Sep 17 00:00:00 2001 From: Rodrigo Teixeira Andreotti Date: Thu, 28 Mar 2024 19:20:47 -0300 Subject: [PATCH] Fix quotes --- test/e2e/cep-promise.spec.js | 10 +++++----- test/unit/cep-promise-browser.spec.js | 20 ++++++++++---------- test/unit/cep-promise-node.spec.js | 24 ++++++++++++------------ test/unit/cep-promise-providers.spec.js | 24 ++++++++++++------------ test/unit/cep-promise-timeout.spec.js | 2 +- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/test/e2e/cep-promise.spec.js b/test/e2e/cep-promise.spec.js index 292c613..7d77b04 100644 --- a/test/e2e/cep-promise.spec.js +++ b/test/e2e/cep-promise.spec.js @@ -18,7 +18,7 @@ describe('[e2e] cep-promise', () => { nock.enableNetConnect() }) - describe('when invoked with a valid '05010000' string', () => { + describe('when invoked with a valid "05010000" string', () => { it('should fulfill with correct address', () => cep('05010000').then((address) => { expect(address).to.deep.equal({ @@ -47,8 +47,8 @@ describe('[e2e] cep-promise', () => { }) }) - describe('when invoked with an inexistent '99999999' CEP', () => { - it('should reject with 'service_error'', () => { + describe('when invoked with an inexistent "99999999" CEP', () => { + it('should reject with "service_error"', () => { return cep('99999999').catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -87,8 +87,8 @@ describe('[e2e] cep-promise', () => { }) }) - describe('when invoked with an invalid '123456789' CEP', () => { - it('should reject with 'validation_error'', () => { + describe('when invoked with an invalid "123456789" CEP', () => { + it('should reject with "validation_error"', () => { return cep('123456789').catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) diff --git a/test/unit/cep-promise-browser.spec.js b/test/unit/cep-promise-browser.spec.js index 7eadcd3..444c805 100644 --- a/test/unit/cep-promise-browser.spec.js +++ b/test/unit/cep-promise-browser.spec.js @@ -57,7 +57,7 @@ describe('[unit] cep-promise for browser', () => { }) describe('when invoked without arguments', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { return cep().catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -78,7 +78,7 @@ describe('[unit] cep-promise for browser', () => { }) describe('when invoked with an Array', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { return cep([1, 2, 3]).catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -99,7 +99,7 @@ describe('[unit] cep-promise for browser', () => { }) describe('when invoked with an Object', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { return cep({ nintendo: true, ps: false, xbox: false }).catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -120,7 +120,7 @@ describe('[unit] cep-promise for browser', () => { }) describe('when invoked with an Function', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { return cep(function zelda() { return 'link' }).catch((error) => { @@ -142,7 +142,7 @@ describe('[unit] cep-promise for browser', () => { }) }) - describe('when invoked with a valid '05010000' String', () => { + describe('when invoked with a valid "05010000" String', () => { it('should fulfill with correct address', () => { nock('https://viacep.com.br') .get('/ws/05010000/json/') @@ -322,8 +322,8 @@ describe('[unit] cep-promise for browser', () => { }) }) - describe('when invoked with an inexistent '99999999' CEP', () => { - it('should reject with 'service_error'', () => { + describe('when invoked with an inexistent "99999999" CEP', () => { + it('should reject with "service_error"', () => { nock('https://viacep.com.br') .get('/ws/99999999/json/') .replyWithFile( @@ -377,8 +377,8 @@ describe('[unit] cep-promise for browser', () => { }) }) - describe('when invoked with an invalid '123456789' CEP', () => { - it('should reject with 'validation_error'', () => { + describe('when invoked with an invalid "123456789" CEP', () => { + it('should reject with "validation_error"', () => { return cep('123456789').catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -398,7 +398,7 @@ describe('[unit] cep-promise for browser', () => { }) describe('when http request fails both for all services with bad response', () => { - it('should reject with 'service_error'', () => { + it('should reject with "service_error"', () => { nock('https://viacep.com.br') .get('/ws/05010000/json/') .reply(400, '

Bad Request (400)

') diff --git a/test/unit/cep-promise-node.spec.js b/test/unit/cep-promise-node.spec.js index ad9b5e9..39ba682 100644 --- a/test/unit/cep-promise-node.spec.js +++ b/test/unit/cep-promise-node.spec.js @@ -75,7 +75,7 @@ describe('[unit] cep-promise for node', () => { }) describe('when invoked without arguments', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { return cep().catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -96,7 +96,7 @@ describe('[unit] cep-promise for node', () => { }) describe('when invoked with an Array', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { return cep([1, 2, 3]).catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -117,7 +117,7 @@ describe('[unit] cep-promise for node', () => { }) describe('when invoked with an Object', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { return cep({ nintendo: true, ps: false, xbox: false }).catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -138,7 +138,7 @@ describe('[unit] cep-promise for node', () => { }) describe('when invoked with an Function', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { return cep(function zelda() { return 'link' }).catch((error) => { @@ -160,7 +160,7 @@ describe('[unit] cep-promise for node', () => { }) }) - describe('when invoked with a valid '05010000' String', () => { + describe('when invoked with a valid "05010000" String', () => { it('should fulfill with correct address', () => { nock('https://apps.correios.com.br') .post('/SigepMasterJPA/AtendeClienteService/AtendeCliente') @@ -617,8 +617,8 @@ describe('[unit] cep-promise for node', () => { }) }) - describe('when invoked with an inexistent '99999999' CEP', () => { - it('should reject with 'service_error'', () => { + describe('when invoked with an inexistent "99999999" CEP', () => { + it('should reject with "service_error"', () => { nock('https://apps.correios.com.br') .post('/SigepMasterJPA/AtendeClienteService/AtendeCliente') .replyWithFile( @@ -695,8 +695,8 @@ describe('[unit] cep-promise for node', () => { }) }) - describe('when invoked with an invalid '123456789' CEP', () => { - it('should reject with 'validation_error'', () => { + describe('when invoked with an invalid "123456789" CEP', () => { + it('should reject with "validation_error"', () => { return cep('123456789').catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -716,7 +716,7 @@ describe('[unit] cep-promise for node', () => { }) describe('when http request fails both for primary and secondary service with bad response', () => { - it('should reject with 'service_error'', () => { + it('should reject with "service_error"', () => { nock('https://apps.correios.com.br') .post('/SigepMasterJPA/AtendeClienteService/AtendeCliente') .replyWithError( @@ -775,7 +775,7 @@ describe('[unit] cep-promise for node', () => { }) describe('when http request has unformatted xml and alternatives services fails', () => { - it('should reject with 'service_error'', () => { + it('should reject with "service_error"', () => { nock('https://apps.correios.com.br') .post('/SigepMasterJPA/AtendeClienteService/AtendeCliente') .replyWithFile( @@ -835,7 +835,7 @@ describe('[unit] cep-promise for node', () => { }) describe('when http request fails both for primary and secondary service with error', () => { - it('should reject with 'service_error'', () => { + it('should reject with "service_error"', () => { nock('https://apps.correios.com.br') .post('/SigepMasterJPA/AtendeClienteService/AtendeCliente') .replyWithError( diff --git a/test/unit/cep-promise-providers.spec.js b/test/unit/cep-promise-providers.spec.js index 69a63b0..b68aa32 100644 --- a/test/unit/cep-promise-providers.spec.js +++ b/test/unit/cep-promise-providers.spec.js @@ -19,7 +19,7 @@ describe('when invoked with providers parameter', () => { }) describe('and the providers param is a string', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { return cep('05010000', { providers: 'viacep' }).catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -39,7 +39,7 @@ describe('when invoked with providers parameter', () => { }) describe('and the providers param is a integer', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { return cep('05010000', { providers: 123 }).catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -59,7 +59,7 @@ describe('when invoked with providers parameter', () => { }) describe('and the providers param is a object', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { return cep('05010000', { providers: {} }).catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -79,7 +79,7 @@ describe('when invoked with providers parameter', () => { }) describe('and the providers param is a function', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { return cep('05010000', { providers: () => () => {} }).catch((error) => { return expect(error) .to.be.an.instanceOf(CepPromiseError) @@ -99,7 +99,7 @@ describe('when invoked with providers parameter', () => { }) describe('and the providers param is a invalid array', () => { - it('should reject with 'validation_error'', () => { + it('should reject with "validation_error"', () => { const availableProviders = Object.keys(getAvailableServices()) return cep('05010000', { providers: [123, 'viacep'] }).catch((error) => { @@ -121,7 +121,7 @@ describe('when invoked with providers parameter', () => { }) }) - describe('and the providers param is ['viacep']', () => { + describe('and the providers param is ["viacep"]', () => { it('should call only viacep service', () => { const correiosMock = nock('https://apps.correios.com.br') .post('/SigepMasterJPA/AtendeClienteService/AtendeCliente') @@ -176,7 +176,7 @@ describe('when invoked with providers parameter', () => { }) }) - describe('and the providers param is ['postmon']', () => { + describe('and the providers param is ["postmon"]', () => { it('should call only postmon service', () => { const correiosMock = nock('https://apps.correios.com.br') .post('/SigepMasterJPA/AtendeClienteService/AtendeCliente') @@ -231,7 +231,7 @@ describe('when invoked with providers parameter', () => { }) }) - describe('and the providers param is ['widenet']', () => { + describe('and the providers param is ["widenet"]', () => { it('should call only widenet service', () => { const correiosMock = nock('https://apps.correios.com.br') .post('/SigepMasterJPA/AtendeClienteService/AtendeCliente') @@ -286,7 +286,7 @@ describe('when invoked with providers parameter', () => { }) }) - describe('and the providers param is ['correios']', () => { + describe('and the providers param is ["correios"]', () => { it('should call only correios service', () => { const correiosMock = nock('https://apps.correios.com.br') .post('/SigepMasterJPA/AtendeClienteService/AtendeCliente') @@ -341,7 +341,7 @@ describe('when invoked with providers parameter', () => { }) }) - describe('and the providers param is ['correios-alt']', () => { + describe('and the providers param is ["correios-alt"]', () => { it('should call only correios alt service', () => { const correiosMock = nock('https://apps.correios.com.br') .post('/SigepMasterJPA/AtendeClienteService/AtendeCliente') @@ -398,7 +398,7 @@ describe('when invoked with providers parameter', () => { }) }) - describe('and the providers param is ['brasilapi']', () => { + describe('and the providers param is ["brasilapi"]', () => { it('should call only brasilapi service', () => { const correiosMock = nock('https://apps.correios.com.br') .post('/SigepMasterJPA/AtendeClienteService/AtendeCliente') @@ -462,7 +462,7 @@ describe('when invoked with providers parameter', () => { }) }) - describe('and the providers param is ['correios, viacep']', () => { + describe('and the providers param is ["correios, viacep"]', () => { it('should call only correios and viacep services', () => { const correiosMock = nock('https://apps.correios.com.br') .post('/SigepMasterJPA/AtendeClienteService/AtendeCliente') diff --git a/test/unit/cep-promise-timeout.spec.js b/test/unit/cep-promise-timeout.spec.js index b76f9aa..910af40 100644 --- a/test/unit/cep-promise-timeout.spec.js +++ b/test/unit/cep-promise-timeout.spec.js @@ -18,7 +18,7 @@ describe('when invoked with timeout parameter', () => { }) describe('and the providers exceed the timeout', () => { - it('should reject with 'service_error'', () => { + it('should reject with "service_error"', () => { nock('https://brasilapi.com.br/') .get('/api/cep/v1/05010000') .delay(3)