mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-05 10:41:03 -04:00
Add tests for load costume error handling. Fix issue where asset data was not getting saved out properly.
This commit is contained in:
parent
a8618b378f
commit
70a78cf7db
15 changed files with 418 additions and 13 deletions
test/fixtures
5
test/fixtures/readProjectFile.js
vendored
5
test/fixtures/readProjectFile.js
vendored
|
@ -12,5 +12,10 @@ module.exports = {
|
|||
return JSON.parse(zip.readAsText(projectEntry.entryName, 'utf8'));
|
||||
}
|
||||
return null;
|
||||
},
|
||||
extractAsset: function (path, assetFileName) {
|
||||
const zip = new AdmZip(path);
|
||||
const assetEntry = zip.getEntries().filter(item => item.entryName.match(assetFileName))[0];
|
||||
return assetEntry.getData();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue