From 429a501460fd5e30b195197c16378713cb904b1f Mon Sep 17 00:00:00 2001 From: Marie Malarme Date: Thu, 4 Mar 2021 19:19:40 +0000 Subject: [PATCH] dom test: changed the path to look for the exercise name instead of index for HTML files --- dom/test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dom/test.js b/dom/test.js index af6c3458..cd3192c5 100644 --- a/dom/test.js +++ b/dom/test.js @@ -65,9 +65,9 @@ const ifNotExists = (p, fn) => { } } -ifNotExists(`./subjects/${exercise}/index.html`, () => { +ifNotExists(`./subjects/${exercise}/${exercise}.html`, () => { const indexPath = path.join(solutionPath, `${exercise}.html`) - pathMap[`/${exercise}/index.html`] = indexPath + pathMap[`/${exercise}/${exercise}.html`] = indexPath ifNotExists(indexPath, () => { console.error(`missing student ${exercise}.html file`) process.exit(1) @@ -100,7 +100,7 @@ const server = http browser = await puppeteer.launch(config) const [page] = await browser.pages() - await page.goto(`http://localhost:${PORT}/${exercise}/index.html`) + await page.goto(`http://localhost:${PORT}/${exercise}/${exercise}.html`) deepStrictEqual.$ = async (selector, props) => { const keys = Object.keys(props) const extractProps = (node, props) => {