Skip to content

Commit

Permalink
update testing
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed Feb 5, 2018
1 parent 0598d2f commit 7b9ee22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function (archive, files, options) {
return when.promise(function (resolve, reject, progress) {

// Convert array of files into a string if needed.
files = u.files(files);
var files = u.files(files);
try {
if (options.path) {
var command = u.path(options);
Expand Down
5 changes: 4 additions & 1 deletion test/lib/add.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
var expect = require('chai').expect;
var exec = require('child_process').execSync;
var add = require('../../lib/add');
var path = require('path');

describe('Method: `Zip.add`', function () {

Expand Down Expand Up @@ -40,8 +41,10 @@ describe('Method: `Zip.add`', function () {
});

it('should accept a path', function (done) {
var macos = (process.platform == "darwin") ? require('macos-release').version : '';
var pathto7z = path.join(__dirname, "..","binaries", macos == '' ? process.platform : process.platform, macos );
add('.tmp/test/add.zip', '*.md', {
path: '/usr/local/bin/7z'
path: path.join(pathto7z,process.platform === "win32" ? '7za.exe' : '7za')
})
.progress(function (entries) {
expect(entries.length).to.be.at.least(1);
Expand Down

0 comments on commit 7b9ee22

Please sign in to comment.