mirror of
https://github.com/scratchfoundation/scratch-parser.git
synced 2025-08-28 22:18:45 -04:00
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:
parent
1501c957c7
commit
663d6ee8e6
6 changed files with 138 additions and 22 deletions
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue