Skip to content

Commit f7b648c

Browse files
committed
Fix build errors
1 parent d21a6f3 commit f7b648c

1 file changed

Lines changed: 20 additions & 16 deletions

File tree

test/flow/oauth1.js

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ var request = require('request-compose').extend({
1111
var config = require('../../lib/config')
1212
var oauth1 = require('../../lib/flow/oauth1')
1313

14-
var provider = {
15-
...require('../consumer/util/provider'),
14+
var provider = Object.assign({}, require('../consumer/util/provider'), {
15+
// ...require('../consumer/util/provider'),
1616
port: 5000,
1717
url: (path) => `http://localhost:${provider.port}${path}`,
1818
server: null,
19-
}
20-
var client = {
21-
...require('../consumer/util/client'),
19+
})
20+
var client = Object.assign({}, require('../consumer/util/client'), {
21+
// ...require('../consumer/util/client'),
2222
port: 5001,
2323
url: (path) => `http://localhost:${client.port}${path}`,
2424
server: null, grant: null, app: null,
25-
}
25+
})
2626

2727

2828
describe('oauth1', () => {
@@ -45,7 +45,8 @@ describe('oauth1', () => {
4545
server: client.server,
4646
grant: client.grant,
4747
app: client.app,
48-
} = await client.express({defaults, ...providers}, client.port))
48+
// } = await client.express({defaults, ...providers}, client.port))
49+
} = await client.express(Object.assign({defaults}, providers), client.port))
4950
})
5051

5152
after((done) => {
@@ -218,9 +219,10 @@ describe('oauth1', () => {
218219
provider.oauth1.authorize = ({query}) => {
219220
t.deepEqual(query, {perms: 'a,b', oauth_token: 'token'})
220221
}
221-
client.grant.config.flickr.scope = config.format.scope({
222-
...client.grant.config.flickr, scope: ['a', 'b']
223-
})
222+
client.grant.config.flickr.scope = config.format.scope(
223+
// {...client.grant.config.flickr, scope: ['a', 'b']}
224+
Object.assign(client.grant.config.flickr, {scope: ['a', 'b']})
225+
)
224226
var {body: {response}} = await request({
225227
url: client.url('/connect/flickr'),
226228
cookie: {},
@@ -248,9 +250,10 @@ describe('oauth1', () => {
248250
provider.oauth1.authorize = ({query}) => {
249251
t.deepEqual(query, {scope: 'a b', oauth_token: 'token'})
250252
}
251-
client.grant.config.ravelry.scope = config.format.scope({
252-
...client.grant.config.ravelry, scope: ['a', 'b']
253-
})
253+
client.grant.config.ravelry.scope = config.format.scope(
254+
// {...client.grant.config.ravelry, scope: ['a', 'b']}
255+
Object.assign(client.grant.config.ravelry, {scope: ['a', 'b']})
256+
)
254257
var {body: {response}} = await request({
255258
url: client.url('/connect/ravelry'),
256259
cookie: {},
@@ -266,9 +269,10 @@ describe('oauth1', () => {
266269
provider.oauth1.authorize = ({query}) => {
267270
t.deepEqual(query, {scope: 'a,b', oauth_token: 'token'})
268271
}
269-
client.grant.config.trello.scope = config.format.scope({
270-
...client.grant.config.trello, scope: ['a', 'b']
271-
})
272+
client.grant.config.trello.scope = config.format.scope(
273+
// {...client.grant.config.trello, scope: ['a', 'b']}
274+
Object.assign(client.grant.config.trello, {scope: ['a', 'b']})
275+
)
272276
var {body: {response}} = await request({
273277
url: client.url('/connect/trello'),
274278
cookie: {},

0 commit comments

Comments
 (0)