Skip to content

Commit

Permalink
Make errors show up better in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rattrayalex-stripe committed Jul 31, 2019
1 parent 4f2bc28 commit d50bcae
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/StripeResource.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('StripeResource', () => {
.reply(200, '{}');

realStripe.invoices.retrieveUpcoming(options.data, (err, response) => {
done();
done(err);
scope.done();
});
});
Expand All @@ -92,7 +92,7 @@ describe('StripeResource', () => {
'sub_123',
options.data,
(err, response) => {
done();
done(err);
scope.done();
}
);
Expand Down Expand Up @@ -175,7 +175,7 @@ describe('StripeResource', () => {

realStripe.charges.create(options.data, (err, charge) => {
expect(charge.id).to.equal('ch_123');
done();
done(err);
});
});

Expand All @@ -198,7 +198,7 @@ describe('StripeResource', () => {

realStripe.charges.create(options.data, (err, charge) => {
expect(charge.id).to.equal('ch_123');
done();
done(err);
});
});

Expand Down Expand Up @@ -272,7 +272,7 @@ describe('StripeResource', () => {

realStripe.charges.create(options.data, (err, charge) => {
expect(charge.id).to.equal('ch_123');
done();
done(err);
});
});

Expand All @@ -295,7 +295,7 @@ describe('StripeResource', () => {

realStripe.charges.retrieve('ch_123', (err, charge) => {
expect(charge.id).to.equal('ch_123');
done();
done(err);
});
});

Expand All @@ -322,9 +322,9 @@ describe('StripeResource', () => {

realStripe.setMaxNetworkRetries(1);

realStripe.charges.create(options.data, () => {
realStripe.charges.create(options.data, (err) => {
expect(headers).to.have.property('idempotency-key');
done();
done(err);
});
});

Expand Down

0 comments on commit d50bcae

Please sign in to comment.