diff --git a/test/stripe.spec.js b/test/stripe.spec.js index 19655d0b9e..df759430f9 100644 --- a/test/stripe.spec.js +++ b/test/stripe.spec.js @@ -111,8 +111,8 @@ describe('Stripe Module', function() { }); cases.forEach((item) => { - const stripe = Stripe(testUtils.getUserStripeKey(), item); - expect(stripe.getApiField('version')).to.equal(null); + const newStripe = Stripe(testUtils.getUserStripeKey(), item); + expect(newStripe.getApiField('version')).to.equal(null); }); }); @@ -178,22 +178,22 @@ describe('Stripe Module', function() { it('Should include whether typescript: true was passed, respecting reinstantiations', () => { return new Promise((resolve) => resolve()) .then(() => { - const stripe = new Stripe('sk_test_123', { + const newStripe = new Stripe('sk_test_123', { typescript: true, }); return expect( new Promise((resolve, reject) => { - stripe.getClientUserAgent((c) => { + newStripe.getClientUserAgent((c) => { resolve(JSON.parse(c)); }); }) ).to.eventually.have.property('typescript', 'true'); }) .then(() => { - const stripe = new Stripe('sk_test_123', {}); + const newStripe = new Stripe('sk_test_123', {}); return expect( new Promise((resolve, reject) => { - stripe.getClientUserAgent((c) => { + newStripe.getClientUserAgent((c) => { resolve(JSON.parse(c)); }); }) @@ -282,16 +282,16 @@ describe('Stripe Module', function() { expect(stripe.getApiField('timeout')).to.equal(defaultTimeout); }); it('Should allow me to set a custom timeout', () => { - const stripe = Stripe('sk_test', { + const newStripe = Stripe('sk_test', { timeout: 900, }); - expect(stripe.getApiField('timeout')).to.equal(900); + expect(newStripe.getApiField('timeout')).to.equal(900); }); it('Should allow me to set null, to reset to the default', () => { - const stripe = Stripe('sk_test', { + const newStripe = Stripe('sk_test', { timeout: null, }); - expect(stripe.getApiField('timeout')).to.equal(defaultTimeout); + expect(newStripe.getApiField('timeout')).to.equal(defaultTimeout); }); }); @@ -390,7 +390,7 @@ describe('Stripe Module', function() { }); it('should ignore any invalid properties', () => { - const stripe = Stripe('sk_test', { + const newStripe = Stripe('sk_test', { appInfo: { name: 'MyAwesomeApp', partner_id: 'partner_1234', @@ -399,7 +399,7 @@ describe('Stripe Module', function() { countOfRadishes: 512, }, }); - expect(stripe._appInfo).to.eql({ + expect(newStripe._appInfo).to.eql({ name: 'MyAwesomeApp', partner_id: 'partner_1234', version: '1.2.345', @@ -415,14 +415,14 @@ describe('Stripe Module', function() { url: 'https://myawesomeapp.info', }; - const stripe = Stripe('sk_test', { + const newStripe = Stripe('sk_test', { appInfo, }); - stripe.getClientUserAgent((uaString) => { + newStripe.getClientUserAgent((uaString) => { expect(JSON.parse(uaString).application).to.eql(appInfo); - expect(stripe.getAppInfoAsString()).to.eql( + expect(newStripe.getAppInfoAsString()).to.eql( `${appInfo.name}/${appInfo.version} (${appInfo.url})` );