Skip to content

Commit

Permalink
Merge pull request #605 from vizzuhq/tutorial_cwd
Browse files Browse the repository at this point in the history
Fix tutorial test with different cwd
  • Loading branch information
veghdev authored Nov 8, 2024
2 parents aafc66d + 6bb778b commit bf5278c
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 bf5278c

Please sign in to comment.