Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

phonegap-build

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phonegap-build - npm Package Compare versions

Comparing version 0.10.0 to 1.0.0

spec/support/jasmine.json

56

package.json
{
"name": "phonegap-build",
"description": "PhoneGap Build node library.",
"version": "0.10.0",
"version": "1.0.0",
"homepage": "http://github.com/phonegap/node-phonegap-build",

@@ -19,35 +19,39 @@ "repository": {

"scripts": {
"test": "jasmine-node --color spec"
"test": "jasmine"
},
"engines": {
"node": ">=0.8.0"
"node": ">=6.0.0"
},
"dependencies": {
"colors": "0.6.x",
"jasmine": "^3.2.0",
"optimist": "0.3.x",
"phonegap-build-api": "1.0.0",
"prompt": "0.2.x",
"shelljs": "0.0.x",
"optimist": "0.3.x",
"qrcode-terminal": "0.8.x",
"phonegap-build-api": "0.4.0"
"shelljs": "0.0.x"
},
"devDependencies": {
"jasmine-node": "1.10.1"
},
"optionalDependencies": {
},
"contributors": [{
"name": "Michael Brooks",
"email": "michael@michaelbrooks.ca",
"url": "http://michaelbrooks.ca"
},
{
"name": "Mathijs de Bruin",
"email": "mathijs@mathijsfietst.nl",
"url": "http://djangopeople.net/dokterbob"
},
{
"name": "Benn Mapes",
"email": "benn.mapes@gmail.com",
"url": "http://github.com/bennmapes"
}]
"devDependencies": {},
"optionalDependencies": {},
"contributors": [
{
"name": "Michael Brooks",
"email": "michael@michaelbrooks.ca",
"url": "http://michaelbrooks.ca"
},
{
"name": "Mathijs de Bruin",
"email": "mathijs@mathijsfietst.nl",
"url": "http://djangopeople.net/dokterbob"
},
{
"name": "Benn Mapes",
"email": "benn.mapes@gmail.com",
"url": "http://github.com/bennmapes"
},
{
"name": "Jesse MacFadyen",
"url": "https://github.com/purplecabbage"
}
]
}

@@ -1,2 +0,2 @@

# PhoneGap Build Node Module [![Build Status][travis-ci-img]][travis-ci-url] [![bitHound Score][bithound-img]][bithound-url]
# PhoneGap Build Node Module [![Build Status][travis-ci-img]][travis-ci-url]

@@ -195,4 +195,2 @@ > Node module to create and build PhoneGap projects with PhoneGap Build.

[travis-ci-url]: https://travis-ci.org/phonegap/node-phonegap-build
[bithound-img]: https://www.bithound.io/github/phonegap/node-phonegap-build/badges/score.svg
[bithound-url]: https://www.bithound.io/github/phonegap/node-phonegap-build

@@ -32,3 +32,3 @@ /*

expect(fs.exists).toHaveBeenCalled();
expect(fs.exists.mostRecentCall.args[0]).toEqual(
expect(fs.exists.calls.mostRecent().args[0]).toEqual(
path.join(config.global.path, 'config.json')

@@ -40,3 +40,3 @@ );

beforeEach(function() {
spyOn(fs, 'exists').andCallFake(function(filepath, callback) {
spyOn(fs, 'exists').and.callFake(function(filepath, callback) {
callback(true);

@@ -50,3 +50,3 @@ });

expect(fs.readFile).toHaveBeenCalled();
expect(fs.readFile.mostRecentCall.args[0]).toEqual(
expect(fs.readFile.calls.mostRecent().args[0]).toEqual(
path.join(config.global.path, 'config.json')

@@ -58,3 +58,3 @@ );

beforeEach(function() {
spyOn(fs, 'readFile').andCallFake(function(filepath, callback) {
spyOn(fs, 'readFile').and.callFake(function(filepath, callback) {
callback(null, '{ "phonegap" : { "token": "abc123" } }');

@@ -81,3 +81,3 @@ });

beforeEach(function() {
spyOn(fs, 'readFile').andCallFake(function(filepath, callback) {
spyOn(fs, 'readFile').and.callFake(function(filepath, callback) {
callback(new Error('file does not exist'));

@@ -105,3 +105,3 @@ });

beforeEach(function() {
spyOn(fs, 'exists').andCallFake(function(filepath, callback) {
spyOn(fs, 'exists').and.callFake(function(filepath, callback) {
callback(false);

@@ -119,3 +119,3 @@ });

beforeEach(function() {
spyOn(config.global, 'save').andCallFake(function(data, callback) {
spyOn(config.global, 'save').and.callFake(function(data, callback) {
callback(null);

@@ -127,3 +127,3 @@ });

config.global.load(function(e, data) {});
expect(config.global.save.mostRecentCall.args[0]).toEqual({ phonegap: {} });
expect(config.global.save.calls.mostRecent().args[0]).toEqual({ phonegap: {} });
});

@@ -148,3 +148,3 @@

beforeEach(function() {
spyOn(config.global, 'save').andCallFake(function(data, callback) {
spyOn(config.global, 'save').and.callFake(function(data, callback) {
callback(new Error('no write access'));

@@ -189,3 +189,3 @@ });

expect(shell.mkdir).toHaveBeenCalled();
expect(shell.mkdir.mostRecentCall.args[0]).toEqual('-p');
expect(shell.mkdir.calls.mostRecent().args[0]).toEqual('-p');
});

@@ -196,3 +196,3 @@

expect(fs.writeFile).toHaveBeenCalled();
expect(fs.writeFile.mostRecentCall.args[0]).toEqual(
expect(fs.writeFile.calls.mostRecent().args[0]).toEqual(
path.join(config.global.path, 'config.json')

@@ -204,3 +204,3 @@ );

beforeEach(function() {
fs.writeFile.andCallFake(function(filepath, data, callback) {
fs.writeFile.and.callFake(function(filepath, data, callback) {
callback(null);

@@ -212,3 +212,3 @@ });

config.global.save(data, function(e) {});
expect(fs.writeFile.mostRecentCall.args[0]).toEqual(
expect(fs.writeFile.calls.mostRecent().args[0]).toEqual(
path.join(config.global.path, 'config.json')

@@ -220,3 +220,3 @@ );

config.global.save({ phonegap: { token: 'def456', username: 'link' } }, function(e) {
var data = JSON.parse(fs.writeFile.mostRecentCall.args[1]);
var data = JSON.parse(fs.writeFile.calls.mostRecent().args[1]);
expect(data).toEqual({ phonegap: { token: 'def456', username: 'link' } });

@@ -237,3 +237,3 @@ done();

beforeEach(function() {
fs.writeFile.andCallFake(function(filepath, data, callback) {
fs.writeFile.and.callFake(function(filepath, data, callback) {
callback(new Error('no write access'));

@@ -240,0 +240,0 @@ });

@@ -15,4 +15,6 @@ /*

describe('config.local.load(callback)', function() {
let readFileSpy;
beforeEach(function() {
spyOn(fs, 'readFile');
readFileSpy = spyOn(fs, 'readFile');
});

@@ -29,3 +31,3 @@

expect(fs.readFile).toHaveBeenCalled();
expect(fs.readFile.mostRecentCall.args[0]).toEqual(
expect(fs.readFile.calls.argsFor(0)[0]).toEqual(
path.join(process.cwd(), '.cordova', 'config.json')

@@ -37,3 +39,3 @@ );

beforeEach(function() {
fs.readFile.andCallFake(function(path, callback) {
readFileSpy.and.callFake(function(path, callback) {
callback(null, '{}');

@@ -60,3 +62,3 @@ });

beforeEach(function() {
fs.readFile.andCallFake(function(path, callback) {
fs.readFile.and.callFake(function(path, callback) {
callback(new Error('file not found'));

@@ -108,3 +110,3 @@ });

expect(fs.writeFile).toHaveBeenCalled();
expect(fs.writeFile.mostRecentCall.args[1]).toEqual(JSON.stringify(data));
expect(fs.writeFile.calls.mostRecent().args[1]).toEqual(JSON.stringify(data));
});

@@ -114,3 +116,3 @@

beforeEach(function() {
fs.writeFile.andCallFake(function(filepath, data, callback) {
fs.writeFile.and.callFake(function(filepath, data, callback) {
callback(null);

@@ -130,3 +132,3 @@ });

beforeEach(function() {
fs.writeFile.andCallFake(function(filepath, data, callback) {
fs.writeFile.and.callFake(function(filepath, data, callback) {
callback(new Error('permission denied'));

@@ -133,0 +135,0 @@ });

@@ -68,3 +68,3 @@ /*

expect(
phonegapbuild.login.mostRecentCall.args[0].protocol
phonegapbuild.login.calls.mostRecent().args[0].protocol
).toEqual('http:');

@@ -77,3 +77,3 @@ });

expect(
phonegapbuild.login.mostRecentCall.args[0].host
phonegapbuild.login.calls.mostRecent().args[0].host
).toEqual('stage.build.phonegap.com');

@@ -86,3 +86,3 @@ });

expect(
phonegapbuild.login.mostRecentCall.args[0].port
phonegapbuild.login.calls.mostRecent().args[0].port
).toEqual('1337');

@@ -95,3 +95,3 @@ });

expect(
phonegapbuild.login.mostRecentCall.args[0].path
phonegapbuild.login.calls.mostRecent().args[0].path
).toEqual('/api/v1');

@@ -104,3 +104,3 @@ });

expect(
phonegapbuild.login.mostRecentCall.args[0].proxy
phonegapbuild.login.calls.mostRecent().args[0].proxy
).toEqual('my.proxy.com');

@@ -112,3 +112,3 @@ });

beforeEach(function() {
phonegapbuild.login.andCallFake(function(options, callback) {
phonegapbuild.login.and.callFake(function(options, callback) {
callback(null, { /* api */ });

@@ -120,3 +120,3 @@ });

beforeEach(function() {
config.local.load.andCallFake(function(callback) {
config.local.load.and.callFake(function(callback) {
callback(null, { 'phonegap': { 'id': 12345 } });

@@ -143,3 +143,3 @@ });

beforeEach(function() {
phonegapbuild.build.build.andCallFake(function(options, callback) {
phonegapbuild.build.build.and.callFake(function(options, callback) {
callback(null, appData);

@@ -166,3 +166,3 @@ });

beforeEach(function() {
phonegapbuild.build.build.andCallFake(function(options, callback) {
phonegapbuild.build.build.and.callFake(function(options, callback) {
callback(new Error('server did not respond'));

@@ -191,3 +191,3 @@ });

beforeEach(function() {
config.local.load.andCallFake(function(callback) {
config.local.load.and.callFake(function(callback) {
callback(null, {});

@@ -207,3 +207,3 @@ });

beforeEach(function() {
phonegapbuild.build.create.andCallFake(function(options, callback) {
phonegapbuild.build.create.and.callFake(function(options, callback) {
callback(null, appData);

@@ -230,3 +230,3 @@ });

beforeEach(function() {
phonegapbuild.build.create.andCallFake(function(options, callback) {
phonegapbuild.build.create.and.callFake(function(options, callback) {
callback(new Error('server did not respond'));

@@ -256,3 +256,3 @@ });

beforeEach(function() {
phonegapbuild.login.andCallFake(function(options, callback) {
phonegapbuild.login.and.callFake(function(options, callback) {
var e = new Error('incorrect username or password');

@@ -259,0 +259,0 @@ phonegapbuild.emit('error', e);

@@ -90,7 +90,7 @@ /*

beforeEach(function() {
zip.compress.andCallFake(function(wwwPath, buildPath, callback) {
zip.compress.and.callFake(function(wwwPath, buildPath, callback) {
callback(null, '/path/to/build/www.zip');
});
config.local.load.andCallFake(function(callback) {
config.local.load.and.callFake(function(callback) {
callback(null, {

@@ -115,3 +115,3 @@ 'phonegap': {

beforeEach(function() {
options.api.put.andCallFake(function(path, headers, callback) {
options.api.put.and.callFake(function(path, headers, callback) {
callback(null, {});

@@ -133,3 +133,3 @@ });

beforeEach(function() {
build.waitForComplete.andCallFake(function(options, callback) {
build.waitForComplete.and.callFake(function(options, callback) {
callback(null, appData);

@@ -156,3 +156,3 @@ });

beforeEach(function() {
build.waitForComplete.andCallFake(function(options, callback) {
build.waitForComplete.and.callFake(function(options, callback) {
callback(new Error('server did not respond'));

@@ -173,3 +173,3 @@ });

beforeEach(function() {
options.api.put.andCallFake(function(path, headers, callback) {
options.api.put.and.callFake(function(path, headers, callback) {
callback(new Error('Server did not respond'));

@@ -176,0 +176,0 @@ });

@@ -65,3 +65,3 @@ /*

beforeEach(function() {
phonegapbuild.create.local.andCallFake(function(options, callback) {
phonegapbuild.create.local.and.callFake(function(options, callback) {
callback(null);

@@ -81,3 +81,3 @@ });

beforeEach(function() {
phonegapbuild.create.local.andCallFake(function(options, callback) {
phonegapbuild.create.local.and.callFake(function(options, callback) {
callback(new Error('app path already exists'));

@@ -144,3 +144,3 @@ });

beforeEach(function() {
fs.exists.andCallFake(function(path, callback) {
fs.exists.and.callFake(function(path, callback) {
callback(false);

@@ -153,3 +153,3 @@ });

expect(shell.cp).toHaveBeenCalled();
expect(shell.cp.mostRecentCall.args[0]).toEqual('-R');
expect(shell.cp.calls.mostRecent().args[0]).toEqual('-R');
});

@@ -159,3 +159,3 @@

beforeEach(function() {
spyOn(shell, 'error').andReturn(null);
spyOn(shell, 'error').and.returnValue(null);
});

@@ -173,8 +173,10 @@

beforeEach(function() {
spyOn(shell, 'error').andReturn('no write access to path');
spyOn(shell, 'error').and.returnValue('no write access to path');
});
it('should not throw an error', function() {
it('should not throw an error', function(done) {
expect(function() {
phonegapbuild.create.local(options, function(e) {});
phonegapbuild.create.local(options, function(e) {
done();
});
}).not.toThrow();

@@ -194,3 +196,3 @@ });

beforeEach(function() {
fs.exists.andCallFake(function(path, callback) {
fs.exists.and.callFake(function(path, callback) {
callback(true);

@@ -197,0 +199,0 @@ });

@@ -82,11 +82,11 @@ /*

expect(fs.readFile).toHaveBeenCalled();
expect(fs.readFile.mostRecentCall.args[0]).toMatch('www/config.xml');
expect(fs.readFile.calls.mostRecent().args[0]).toMatch('www/config.xml');
});
it('should fallback to my-app/config.xml', function() {
spyOn(fs, 'existsSync').andReturn(true);
spyOn(fs, 'existsSync').and.returnValue(true);
create(options, function(e, data) {});
expect(fs.readFile).toHaveBeenCalled();
expect(fs.readFile.mostRecentCall.args[0]).not.toMatch('www/config.xml');
expect(fs.readFile.mostRecentCall.args[0]).toMatch('/config.xml');
expect(fs.readFile.calls.mostRecent().args[0]).not.toMatch('www/config.xml');
expect(fs.readFile.calls.mostRecent().args[0]).toMatch('/config.xml');
});

@@ -97,3 +97,3 @@

expect(fs.readFile).toHaveBeenCalled();
expect(fs.readFile.mostRecentCall.args[0]).toMatch(/config\.xml$/);
expect(fs.readFile.calls.mostRecent().args[0]).toMatch(/config\.xml$/);
});

@@ -104,3 +104,3 @@ });

beforeEach(function() {
fs.readFile.andCallFake(function(path, encoding, callback) {
fs.readFile.and.callFake(function(path, encoding, callback) {
callback(null, '<widget><name>My App</name></widget>');

@@ -121,3 +121,3 @@ });

beforeEach(function() {
zip.compress.andCallFake(function(wwwPath, buildPath, callback) {
zip.compress.and.callFake(function(wwwPath, buildPath, callback) {
callback(null, '/path/to/build/www.zip');

@@ -138,3 +138,3 @@ });

beforeEach(function() {
options.api.post.andCallFake(function(path, headers, callback) {
options.api.post.and.callFake(function(path, headers, callback) {
callback(null, { id: '10' });

@@ -156,3 +156,3 @@ });

beforeEach(function() {
config.local.load.andCallFake(function(callback) {
config.local.load.and.callFake(function(callback) {
callback(null, {});

@@ -169,3 +169,3 @@ });

beforeEach(function() {
config.local.save.andCallFake(function(data, callback) {
config.local.save.and.callFake(function(data, callback) {
callback(null);

@@ -182,3 +182,3 @@ });

beforeEach(function() {
create.waitForComplete.andCallFake(function(options, callback) {
create.waitForComplete.and.callFake(function(options, callback) {
callback(null, appData);

@@ -204,3 +204,3 @@ });

beforeEach(function() {
create.waitForComplete.andCallFake(function(options, callback) {
create.waitForComplete.and.callFake(function(options, callback) {
callback(new Error('server did not respond'));

@@ -221,3 +221,3 @@ });

beforeEach(function() {
config.local.save.andCallFake(function(data, callback) {
config.local.save.and.callFake(function(data, callback) {
callback(new Error('could not write config.json'));

@@ -238,3 +238,3 @@ });

beforeEach(function() {
config.local.load.andCallFake(function(callback) {
config.local.load.and.callFake(function(callback) {
callback(new Error('could not read config.json'));

@@ -260,3 +260,3 @@ });

beforeEach(function() {
options.api.post.andCallFake(function(path, headers, callback) {
options.api.post.and.callFake(function(path, headers, callback) {
callback(new Error('PhoneGap Build did not respond'));

@@ -282,3 +282,3 @@ });

beforeEach(function() {
zip.compress.andCallFake(function(wwwPath, buildPath, callback) {
zip.compress.and.callFake(function(wwwPath, buildPath, callback) {
callback(new Error('Write access denied'));

@@ -305,3 +305,3 @@ });

beforeEach(function() {
fs.readFile.andCallFake(function(path, encoding, callback) {
fs.readFile.and.callFake(function(path, encoding, callback) {
callback(new Error('could not open file'));

@@ -321,3 +321,3 @@ });

beforeEach(function() {
fs.readFile.andCallFake(function(path, encoding, callback) {
fs.readFile.and.callFake(function(path, encoding, callback) {
callback(null, '<widget></widget>');

@@ -324,0 +324,0 @@ });

@@ -41,6 +41,7 @@ /*

it('should try to find auth token', function() {
it('should try to find auth token', function(done) {
phonegapbuild.login(options, function(e, api) {});
process.nextTick(function() {
expect(config.global.load).toHaveBeenCalled();
done();
});

@@ -51,3 +52,3 @@ });

beforeEach(function() {
config.global.load.andCallFake(function(callback) {
config.global.load.and.callFake(function(callback) {
callback(null, {

@@ -120,3 +121,3 @@ 'phonegap': {

beforeEach(function() {
config.global.load.andCallFake(function(callback) {
config.global.load.and.callFake(function(callback) {
callback(new Error('config not found at ~/.cordova'));

@@ -144,3 +145,3 @@ });

beforeEach(function() {
client.auth.andCallFake(function(options, callback) {
client.auth.and.callFake(function(options, callback) {
callback(null, { token: 'abc123' });

@@ -155,3 +156,3 @@ });

expect(
config.global.save.mostRecentCall.args[0].phonegap.token
config.global.save.calls.mostRecent().args[0].phonegap.token
).toEqual('abc123');

@@ -164,3 +165,3 @@ done();

beforeEach(function() {
config.global.save.andCallFake(function(data, callback) {
config.global.save.and.callFake(function(data, callback) {
callback(null);

@@ -187,3 +188,3 @@ });

beforeEach(function() {
config.global.save.andCallFake(function(data, callback) {
config.global.save.and.callFake(function(data, callback) {
callback(new Error('No write permission'));

@@ -219,3 +220,3 @@ });

beforeEach(function() {
client.auth.andCallFake(function(options, callback) {
client.auth.and.callFake(function(options, callback) {
callback(new Error('account does not exist'));

@@ -306,3 +307,3 @@ });

beforeEach(function() {
config.global.load.andCallFake(function(callback) {
config.global.load.and.callFake(function(callback) {
callback(new Error('cannot read config file'));

@@ -309,0 +310,0 @@ });

@@ -46,3 +46,3 @@ /*

beforeEach(function() {
config.global.load.andCallFake(function(callback) {
config.global.load.and.callFake(function(callback) {
callback(null, {

@@ -67,3 +67,3 @@ phonegap: {

beforeEach(function() {
config.global.save.andCallFake(function(data, callback) {
config.global.save.and.callFake(function(data, callback) {
callback(null);

@@ -76,3 +76,3 @@ });

process.nextTick(function() {
expect(config.global.save.mostRecentCall.args[0].phonegap.token).not.toBeDefined();
expect(config.global.save.calls.mostRecent().args[0].phonegap.token).not.toBeDefined();
done();

@@ -85,3 +85,3 @@ });

process.nextTick(function() {
expect(config.global.save.mostRecentCall.args[0]).toEqual(
expect(config.global.save.calls.mostRecent().args[0]).toEqual(
{

@@ -107,3 +107,3 @@ phonegap: {

beforeEach(function() {
config.global.save.andCallFake(function(data, callback) {
config.global.save.and.callFake(function(data, callback) {
callback(new Error('no write access'));

@@ -132,3 +132,3 @@ });

beforeEach(function() {
config.global.load.andCallFake(function(callback) {
config.global.load.and.callFake(function(callback) {
callback(new Error('no read access'));

@@ -135,0 +135,0 @@ });

@@ -28,3 +28,3 @@ /*

spyOn(shell, 'cp');
spyOn(shell, 'exec').andReturn({ code: 0 });
spyOn(shell, 'exec').and.returnValue({ code: 0 });
spyOn(shell, 'rm');

@@ -59,3 +59,3 @@ spyOn(shell, 'cd');

beforeEach(function() {
fs.exists.andCallFake(function(path, callback) {
fs.exists.and.callFake(function(path, callback) {
callback(true);

@@ -80,3 +80,3 @@ });

it('should copy my-app/config.xml when it exists', function() {
fs.existsSync.andReturn(true);
fs.existsSync.and.returnValue(true);
zip.compress('./www', './build', function(e, path) {});

@@ -90,3 +90,3 @@ expect(shell.cp).toHaveBeenCalledWith(

it('should not copy my-app/config.xml when it does not exist', function() {
fs.existsSync.andReturn(false);
fs.existsSync.and.returnValue(false);
zip.compress('./www', './build', function(e, path) {});

@@ -106,3 +106,3 @@ expect(shell.cp).not.toHaveBeenCalledWith(

beforeEach(function() {
spyOn(os, 'type').andReturn('Windows_NT');
spyOn(os, 'type').and.returnValue('Windows_NT');
});

@@ -112,3 +112,3 @@

zip.compress('./www', './build', function(e, path) {});
expect(shell.exec.mostRecentCall.args[0]).toMatch('wscript');
expect(shell.exec.calls.mostRecent().args[0]).toMatch('wscript');
});

@@ -118,4 +118,4 @@

zip.compress('./www', './build', function(e, path) {});
expect(shell.exec.mostRecentCall.args[0]).toMatch(p.resolve('./build/www'));
expect(shell.exec.mostRecentCall.args[0]).toMatch(p.resolve('./build'));
expect(shell.exec.calls.mostRecent().args[0]).toMatch(p.resolve('./build/www'));
expect(shell.exec.calls.mostRecent().args[0]).toMatch(p.resolve('./build'));
});

@@ -125,3 +125,3 @@

zip.compress('./path/to the/www', './build', function(e, path) {});
expect(shell.exec.mostRecentCall.args[0]).toMatch(
expect(shell.exec.calls.mostRecent().args[0]).toMatch(
p.resolve('build/www.zip')

@@ -133,3 +133,3 @@ );

zip.compress('./www', './path/to the/build', function(e, path) {});
expect(shell.exec.mostRecentCall.args[0]).toMatch(
expect(shell.exec.calls.mostRecent().args[0]).toMatch(
p.resolve('./path/to the/build')

@@ -142,3 +142,3 @@ );

beforeEach(function() {
spyOn(os, 'type').andReturn('Darwin');
spyOn(os, 'type').and.returnValue('Darwin');
});

@@ -148,3 +148,3 @@

zip.compress('./www', './build', function(e, path) {});
expect(shell.exec.mostRecentCall.args[0]).toMatch(/^zip/);
expect(shell.exec.calls.mostRecent().args[0]).toMatch(/^zip/);
});

@@ -154,3 +154,3 @@

zip.compress('./path/to the/www', './build', function(e, path) {});
expect(shell.exec.mostRecentCall.args[0]).toMatch(
expect(shell.exec.calls.mostRecent().args[0]).toMatch(
p.resolve('build/www.zip')

@@ -162,3 +162,3 @@ );

zip.compress('./www', './path/to the/build', function(e, path) {});
expect(shell.exec.mostRecentCall.args[0]).toMatch(
expect(shell.exec.calls.mostRecent().args[0]).toMatch(
p.resolve('./path/to the/build')

@@ -171,3 +171,3 @@ );

beforeEach(function() {
shell.exec.andReturn({ code: 0 });
shell.exec.and.returnValue({ code: 0 });
});

@@ -192,3 +192,3 @@

beforeEach(function() {
shell.exec.andReturn({ code: 1 });
shell.exec.and.returnValue({ code: 1 });
});

@@ -212,3 +212,3 @@

beforeEach(function() {
fs.exists.andCallFake(function(path, callback) {
fs.exists.and.callFake(function(path, callback) {
callback(false);

@@ -240,3 +240,3 @@ });

beforeEach(function() {
fs.existsSync.andReturn(true);
fs.existsSync.and.returnValue(true);
});

@@ -252,3 +252,3 @@

beforeEach(function() {
fs.existsSync.andReturn(false);
fs.existsSync.and.returnValue(false);
});

@@ -265,3 +265,3 @@

beforeEach(function() {
fs.existsSync.andReturn(true);
fs.existsSync.and.returnValue(true);
});

@@ -277,3 +277,3 @@

beforeEach(function() {
fs.existsSync.andReturn(false);
fs.existsSync.and.returnValue(false);
});

@@ -280,0 +280,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc