Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
modules update
Browse files Browse the repository at this point in the history
  • Loading branch information
goya committed Aug 31, 2018
1 parent 6f57162 commit 4501129
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion index.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pgb-api",
"version": "1.0.4",
"version": "1.0.5",
"description": "nodeJS API to PhoneGap Build",
"keywords": [
"PhoneGap",
Expand All @@ -27,12 +27,12 @@
},
"devDependencies": {
"eslint": "^5.1.0",
"eslint-config-standard": "^11.0.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-jest": "^21.15.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^4.0.0",
"eslint-plugin-standard": "^4.0.0",
"express": "^4.16.3",
"jest": "^23.4.1",
"jest-plugin-fs": "^2.9.0",
Expand Down
12 changes: 6 additions & 6 deletions test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe('api', () => {
return api.addApp('/app.zip', data).then((val) => {
let result = restClient.post.mock.calls[0]
expect(result[0]).toBe('https://build.phonegap.com/api/v1/apps')
expect(result[1]).toMatchObject({data: { hydrates: true, file: { path: '/app.zip' } }})
expect(result[1]).toMatchObject({ data: { hydrates: true, file: { path: '/app.zip' } } })
expect(val).toEqual(ret)
})
})
Expand All @@ -223,7 +223,7 @@ describe('api', () => {
return api.addApp('http://%5:[email protected]/foo/bar', data).then((val) => {
let result = restClient.post.mock.calls[0]
expect(result[0]).toBe('https://build.phonegap.com/api/v1/apps')
expect(result[1]).toMatchObject({data: { hydrates: true, file: { path: 'http://%5:[email protected]/foo/bar' } }})
expect(result[1]).toMatchObject({ data: { hydrates: true, file: { path: 'http://%5:[email protected]/foo/bar' } } })
expect(val).toEqual(ret)
})
})
Expand Down Expand Up @@ -278,7 +278,7 @@ describe('api', () => {
test('should emit events', () => {
expect.assertions(6)
let eventEmitter = new (require('events'))()
let api = apiClient({events: eventEmitter})
let api = apiClient({ events: eventEmitter })
let debug = []

eventEmitter.on('debug', (evt) => {
Expand Down Expand Up @@ -312,7 +312,7 @@ describe('api', () => {
return api.updateApp(12, '/app.zip', data).then((val) => {
let result = restClient.put.mock.calls[0]
expect(result[0]).toBe('https://build.phonegap.com/api/v1/apps/12')
expect(result[1]).toMatchObject({data: { hydrates: true, file: { path: '/app.zip' } }})
expect(result[1]).toMatchObject({ data: { hydrates: true, file: { path: '/app.zip' } } })
expect(val).toEqual(ret)
})
})
Expand Down Expand Up @@ -349,7 +349,7 @@ describe('api', () => {
return api.addWindowsKey('a title', '/cert.keystore', { password: 'abc' }).then((val) => {
let result = restClient.post.mock.calls[0]
expect(result[0]).toBe('https://build.phonegap.com/api/v1/keys/windows')
expect(result[1]).toMatchObject({data: { keystore: { path: '/cert.keystore' }, password: 'abc' }})
expect(result[1]).toMatchObject({ data: { keystore: { path: '/cert.keystore' }, password: 'abc' } })
expect(val).toEqual(ret)
})
})
Expand All @@ -360,7 +360,7 @@ describe('api', () => {
return api.addAndroidKey('a title', 'an alias', '/cert.keystore', { keystore_pw: 'abc', key_pw: 'xyz' }).then((val) => {
let result = restClient.post.mock.calls[0]
expect(result[0]).toBe('https://build.phonegap.com/api/v1/keys/android')
expect(result[1]).toMatchObject({data: { keystore: { path: '/cert.keystore' }, keystore_pw: 'abc', key_pw: 'xyz', alias: 'an alias' }})
expect(result[1]).toMatchObject({ data: { keystore: { path: '/cert.keystore' }, keystore_pw: 'abc', key_pw: 'xyz', alias: 'an alias' } })
expect(val).toEqual(ret)
})
})
Expand Down
6 changes: 3 additions & 3 deletions test/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('merge', () => {
test('handles null values', () => {
expect(merge(null)).toEqual({})
expect(merge(null, null)).toEqual({})
expect(merge(null, { a: true }, null)).toEqual({a: true})
expect(merge(null, { a: true }, null)).toEqual({ a: true })
})

test('returns a clone of all objects', () => {
Expand All @@ -22,11 +22,11 @@ describe('merge', () => {
})

test('last one wins', () => {
expect(merge({a: 1}, {a: 2}, {a: 3})).toEqual({ a: 3 })
expect(merge({ a: 1 }, { a: 2 }, { a: 3 })).toEqual({ a: 3 })
})

test('does nested merging', () => {
expect(merge({a: { c: [], b: 1 }}, { a: { b: 2 } }, { a: { c: 3 } })).toEqual({ a: { b: 2, c: 3 } })
expect(merge({ a: { c: [], b: 1 } }, { a: { b: 2 } }, { a: { c: 3 } })).toEqual({ a: { b: 2, c: 3 } })
})
})

Expand Down
2 changes: 1 addition & 1 deletion test/rest-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('#get', () => {

test('should handle json', () =>
restClient.get('http://localhost:3000/json')
.then((response) => expect(response).toEqual({key: 12}))
.then((response) => expect(response).toEqual({ key: 12 }))
)

test('should handle 404', (done) =>
Expand Down
10 changes: 5 additions & 5 deletions test/zipper.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ describe('zipper', () => {
test('should return files', () => {
let result = {
list: [
{'path': '/app_to_zip/.pgb_dont_delete_me', 'size': 2},
{'path': '/app_to_zip/cordova.js', 'size': 4},
{'path': '/app_to_zip/index.html', 'size': 3},
{'path': '/app_to_zip/res', 'size': 0}
{ 'path': '/app_to_zip/.pgb_dont_delete_me', 'size': 2 },
{ 'path': '/app_to_zip/cordova.js', 'size': 4 },
{ 'path': '/app_to_zip/index.html', 'size': 3 },
{ 'path': '/app_to_zip/res', 'size': 0 }
],
skipped: [ '/app_to_zip/.delete_me [HIDDEN]' ]
}
Expand Down Expand Up @@ -86,7 +86,7 @@ describe('zipper', () => {

return zipper.zipDir('/app_to_zip', '/app2.zip', eventEmitter).then((val) => {
expect(fs.existsSync('/app2.zip')).toBeTruthy()
expect(lastProgress).toEqual({'delta': 109, 'file': 'index.html', 'pos': 236, 'size': 236})
expect(lastProgress).toEqual({ 'delta': 109, 'file': 'index.html', 'pos': 236, 'size': 236 })
})
})
})
Expand Down

0 comments on commit 4501129

Please sign in to comment.