diff --git a/es6/tests/utils.js b/es6/tests/utils.js index 842f3711..203dc4da 100644 --- a/es6/tests/utils.js +++ b/es6/tests/utils.js @@ -898,6 +898,12 @@ function createDocV4(name, options) { } function getZip(name) { + if ( + documentCache[name] === undefined || + documentCache[name].loadedContent === undefined + ) { + throw new Error("the file examples/" + name + " doesn't exist"); + } return new PizZip(documentCache[name].loadedContent); }