Skip to content

Commit b786da9

Browse files
chore(name): expose "CepPromiseError" name
1 parent 57ce5c4 commit b786da9

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ cep('99999999')
9696
.catch(console.log)
9797

9898
// {
99+
// name: 'CepPromiseError',
99100
// message: 'Todos os serviços de CEP retornaram erro.',
100101
// type: 'service_error',
101102
// errors: [{
@@ -120,6 +121,7 @@ cep('123456789123456789')
120121
.catch(console.log)
121122

122123
// {
124+
// name: 'CepPromiseError',
123125
// message: 'CEP deve conter exatamente 8 caracteres.',
124126
// type: 'validation_error',
125127
// errors: [{

test/e2e/cep-promise.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ describe('cep-promise (E2E)', () => {
4444
return expect(error)
4545
.to.be.an.instanceOf(CepPromiseError)
4646
.and.containSubset({
47+
name: 'CepPromiseError',
4748
message: 'Todos os serviços de CEP retornaram erro.',
4849
type: 'service_error',
4950
errors: [{
@@ -65,6 +66,7 @@ describe('cep-promise (E2E)', () => {
6566
return expect(error)
6667
.to.be.an.instanceOf(CepPromiseError)
6768
.and.containSubset({
69+
name: 'CepPromiseError',
6870
message: 'CEP deve conter exatamente 8 caracteres.',
6971
type: 'validation_error',
7072
errors: [{

test/unit/cep-promise.spec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ describe('cep-promise (unit)', () => {
4343
return expect(error)
4444
.to.be.an.instanceOf(CepPromiseError)
4545
.and.containSubset({
46+
name: 'CepPromiseError',
4647
message: 'Erro ao inicializar a instância do CepPromise.',
4748
type: 'validation_error',
4849
errors: [{
@@ -61,6 +62,7 @@ describe('cep-promise (unit)', () => {
6162
return expect(error)
6263
.to.be.an.instanceOf(CepPromiseError)
6364
.and.containSubset({
65+
name: 'CepPromiseError',
6466
message: 'Erro ao inicializar a instância do CepPromise.',
6567
type: 'validation_error',
6668
errors: [{
@@ -79,6 +81,7 @@ describe('cep-promise (unit)', () => {
7981
return expect(error)
8082
.to.be.an.instanceOf(CepPromiseError)
8183
.and.containSubset({
84+
name: 'CepPromiseError',
8285
message: 'Erro ao inicializar a instância do CepPromise.',
8386
type: 'validation_error',
8487
errors: [{
@@ -97,6 +100,7 @@ describe('cep-promise (unit)', () => {
97100
return expect(error)
98101
.to.be.an.instanceOf(CepPromiseError)
99102
.and.containSubset({
103+
name: 'CepPromiseError',
100104
message: 'Erro ao inicializar a instância do CepPromise.',
101105
type: 'validation_error',
102106
errors: [{
@@ -219,6 +223,7 @@ describe('cep-promise (unit)', () => {
219223
return expect(error)
220224
.to.be.an.instanceOf(CepPromiseError)
221225
.and.containSubset({
226+
name: 'CepPromiseError',
222227
message: 'Todos os serviços de CEP retornaram erro.',
223228
type: 'service_error',
224229
errors: [{
@@ -240,6 +245,7 @@ describe('cep-promise (unit)', () => {
240245
return expect(error)
241246
.to.be.an.instanceOf(CepPromiseError)
242247
.and.containSubset({
248+
name: 'CepPromiseError',
243249
message: 'CEP deve conter exatamente 8 caracteres.',
244250
type: 'validation_error',
245251
errors: [{
@@ -265,6 +271,7 @@ describe('cep-promise (unit)', () => {
265271
return expect(error)
266272
.to.be.an.instanceOf(CepPromiseError)
267273
.and.containSubset({
274+
name: 'CepPromiseError',
268275
message: 'Todos os serviços de CEP retornaram erro.',
269276
type: 'service_error',
270277
errors: [{
@@ -293,6 +300,7 @@ describe('cep-promise (unit)', () => {
293300
return expect(error)
294301
.to.be.an.instanceOf(CepPromiseError)
295302
.and.containSubset({
303+
name: 'CepPromiseError',
296304
message: 'Todos os serviços de CEP retornaram erro.',
297305
type: 'service_error',
298306
errors: [{
@@ -321,6 +329,7 @@ describe('cep-promise (unit)', () => {
321329
return expect(error)
322330
.to.be.an.instanceOf(CepPromiseError)
323331
.and.containSubset({
332+
name: 'CepPromiseError',
324333
message: 'Todos os serviços de CEP retornaram erro.',
325334
type: 'service_error',
326335
errors: [{

0 commit comments

Comments
 (0)