mirror of https://github.com/01-edu/public.git
dom test: changed the path to look for the exercise name instead of index for HTML files
This commit is contained in:
parent
6cd5f9aa3c
commit
429a501460
|
@ -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…
Reference in New Issue