From 2af3c992ed4c3b41ebc9e50e3da6873eb86d06e6 Mon Sep 17 00:00:00 2001 From: aayushRedHat Date: Wed, 10 Jan 2024 19:37:30 +0530 Subject: [PATCH] Removed --- test/test-project/index.js | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 test/test-project/index.js diff --git a/test/test-project/index.js b/test/test-project/index.js deleted file mode 100644 index 367135cf9..000000000 --- a/test/test-project/index.js +++ /dev/null @@ -1,29 +0,0 @@ - -const { readFile } = require('fs').promises; -const path = require('path'); -const Generator = require('../lib/generator'); -const dummySpecPath = path.resolve(__dirname, './docs/dummy.yml'); -const crypto = require('crypto'); -const mainTestResultPath = 'test/temp/integrationTestResult'; -//we do not want to download chromium for html-template if it is not needed -process.env['PUPPETEER_SKIP_CHROMIUM_DOWNLOAD'] = true; - - const generateFolderName = () => { - //you always want to generate to new directory to make sure test runs in clear environment - return path.resolve(mainTestResultPath, crypto.randomBytes(4).toString('hex')); - }; - - jest.setTimeout(60000); - - async function check(){ - - const outputDir = generateFolderName(); - const generator = new Generator('@asyncapi/html-template', outputDir, - { forceWrite: true, templateParams: { singleFile: true }, - registry: {url: 'http://localhost:4873/', username: 'admin', password: 'nimbda'}}); - await generator.generateFromFile(dummySpecdocPath); - const file = await readFile(path.join(outputDir, 'index.html'), 'utf8'); - } - - -check() \ No newline at end of file