// THIS TEST IS CALLED DIRECTLY describe(`Testing static content generation ${argv.testgzip ? "" : "with cache"}`, () => { testCaching(); testPermalinkGeneration(); generationIndex(); after((done) => { done(); }); });
function testCaching() { // Testing the cache describe("Test if files have been cached", () => { for (let cachedFile of caches) { const filePath = `${contentDir}/${cachedFile}`; describe(`Does ${filePath} exist`, () => { let shouldExist = true; if (!argv.testgzip && filePath.includes(gzipExt)) shouldExist = false; it(`Should${shouldExist ? "" : "n't"} exist`, (done) => { if (shouldExist) { fileExist(filePath).should.equal(shouldExist); } else { fileExist(filePath).should.equal(shouldExist); } done(); }); }); } }); }