test($test): Rename zip to unzip for clarity. Add descriptive error message to

Added unit tests for unzip and added a user-friendly error message for unzip being unable to perform
its duties of extracting a project.json from the given input (zip).
This commit is contained in:
Karishma Chadha 2018-03-20 12:59:29 -04:00
parent 1501c957c7
commit 663d6ee8e6
6 changed files with 138 additions and 22 deletions

View file

@ -1,4 +1,4 @@
var zip = require('./zip');
var unzip = require('./unzip');
/**
* If input a buffer, transforms buffer into a UTF-8 string.
@ -45,5 +45,5 @@ module.exports = function (input, callback) {
// Return error if legacy encoding detected
if (isLegacy) return callback('Parser only supports Scratch 2.X');
zip(input, callback);
unzip(input, callback);
};