Skip to content

Commit

Permalink
Fix tutorial test with different cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
veghdev committed Nov 8, 2024
1 parent aafc66d commit 6bb778b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/e2e/tests/docs/tutorial.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function getTestSteps(dataFile, configName) {
const animations = (
await loadAnimations(
config.default,
`./docs/tutorial/${configName}`,
`${import.meta.url.replace('file://', '').replace('/tutorial.mjs', '')}/../../../../docs/tutorial/${configName}`,
`../../../../../../docs/tutorial/${configName}`
)
).map((obj) => obj.anims)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/docs/tutorial/events.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ async function getTestSteps(dataFile, configName) {
const [data, config] = await Promise.all([dataLoaded, configLoaded])

const baseUrl = {
nodeBaseUrl: `./docs/tutorial/${configName}`,
nodeBaseUrl: `${import.meta.url.replace('file://', '').replace('/events.mjs', '')}/../../../../../docs/tutorial/${configName}`,
browserBaseUrl: `../../../../../docs/tutorial/${configName}`
}

Expand Down

0 comments on commit 6bb778b

Please sign in to comment.