Skip to content

Commit 8f5e328

Browse files
authored
Merge pull request #135 from particle-iot/bug/sc-93739/fix-library-download-in-particle-api-js
Fix library download in particle-api-js
2 parents e6ee552 + e1dc298 commit 8f5e328

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ export default class Client {
101101
throw error;
102102
}
103103

104-
downloadFile(url){
105-
return this.api.downloadFile({ url });
104+
downloadFile(uri){
105+
return this.api.downloadFile({ uri });
106106
}
107107

108108
/**

test/Client.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ describe('Client', () => {
5656

5757
describe('downloadFile', () => {
5858
it('delegates to api', () => {
59-
api.downloadFile = () => Promise.resolve('delegated');
60-
return expect(client.downloadFile('url')).to.eventually.equal('delegated');
59+
api.downloadFile = ({ uri }) => Promise.resolve(`${uri} delegated`);
60+
return expect(client.downloadFile('uri')).to.eventually.equal('uri delegated');
6161
});
6262
});
6363

0 commit comments

Comments
 (0)