Skip to content

Commit

Permalink
Merge pull request #839 from stripe/ob-bump
Browse files Browse the repository at this point in the history
Run `yarn upgrade` and additional cleanup
  • Loading branch information
ob-stripe authored Mar 14, 2020
2 parents ff86f48 + a789c72 commit 492c81c
Show file tree
Hide file tree
Showing 6 changed files with 504 additions and 442 deletions.
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"beautify.ignore": ["**/*.js", "**/*.md"],

// Extension settings
"eslint.autoFixOnSave": true,
"eslint.packageManager": "yarn",
"npm.packageManager": "yarn",
"editor.codeActionsOnSave": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ app.post(
}
);

app.listen(
3000,
(): void => {
console.log('Example app listening on port 3000!');
}
);
app.listen(3000, (): void => {
console.log('Example app listening on port 3000!');
});
9 changes: 5 additions & 4 deletions test/StripeResource.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ describe('StripeResource', () => {

const scope = nock(`https://${options.host}`)
.get(
`${
options.path
}?customer=cus_123&subscription_items[0][plan]=foo&subscription_items[0][quantity]=2&subscription_items[1][id]=si_123&subscription_items[1][deleted]=true`,
`${options.path}?customer=cus_123&subscription_items[0][plan]=foo&subscription_items[0][quantity]=2&subscription_items[1][id]=si_123&subscription_items[1][deleted]=true`,
''
)
.reply(200, '{}');
Expand Down Expand Up @@ -121,7 +119,10 @@ describe('StripeResource', () => {
path: '/v1/subscriptions/sub_123',
data: {
customer: 'cus_123',
items: [{plan: 'foo', quantity: 2}, {id: 'si_123', deleted: true}],
items: [
{plan: 'foo', quantity: 2},
{id: 'si_123', deleted: true},
],
},
body:
'customer=cus_123&items[0][plan]=foo&items[0][quantity]=2&items[1][id]=si_123&items[1][deleted]=true',
Expand Down
10 changes: 8 additions & 2 deletions test/resources/Plans.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ describe('Plans Resource', () => {
stripe.plans.create({
currency: 'usd',
billing_scheme: 'tiered',
tiers: [{up_to: 123, amount: 100}, {up_to: 'inf', amount: 200}],
tiers: [
{up_to: 123, amount: 100},
{up_to: 'inf', amount: 200},
],
tiers_mode: 'volume',
});
expect(stripe.LAST_REQUEST).to.deep.equal({
Expand All @@ -61,7 +64,10 @@ describe('Plans Resource', () => {
data: {
currency: 'usd',
billing_scheme: 'tiered',
tiers: [{up_to: 123, amount: 100}, {up_to: 'inf', amount: 200}],
tiers: [
{up_to: 123, amount: 100},
{up_to: 'inf', amount: 200},
],
tiers_mode: 'volume',
},
settings: {},
Expand Down
10 changes: 4 additions & 6 deletions types/test/typescriptTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,11 @@ stripe.setHost('host', 'port', 'protocol');
}
}

const cusList: Stripe.ApiList<
Stripe.Customer
> = await stripe.customers.list();
const cusList: Stripe.ApiList<Stripe.Customer> = await stripe.customers.list();

const aThousandCustomers: Array<
Stripe.Customer
> = await stripe.customers.list().autoPagingToArray({limit: 1000});
const aThousandCustomers: Array<Stripe.Customer> = await stripe.customers
.list()
.autoPagingToArray({limit: 1000});

const nothing: void = await stripe.customers
.list()
Expand Down
Loading

0 comments on commit 492c81c

Please sign in to comment.