Browse Source

dom test: changed the path to look for the exercise name instead of index for HTML files

pull/761/head
Marie Malarme 3 years ago committed by Clément
parent
commit
429a501460
  1. 6
      dom/test.js

6
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) => {

Loading…
Cancel
Save