Skip to content

Commit

Permalink
Fix test on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Oct 18, 2023
1 parent dcabd6d commit 8eb11e2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/mdx/test/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -998,11 +998,9 @@ test('@mdx-js/mdx: compile', async function (t) {
function (error) {
const exception = /** @type {Error} */ (error)
const match = /at Component \(([^)]+)\)/.exec(String(exception.stack))
// To do: check if this works on windows.
const place = base.pathname + 'unknown.mdx:2:3'
return place === match?.[1]
},
'should support source maps'
const actual = match?.[1].split(/\\|\//g).join('/') || ''
return (base.pathname + 'unknown.mdx:2:3').endsWith(actual)
}
)

await fs.unlink(url)
Expand Down

1 comment on commit 8eb11e2

@vercel
Copy link

@vercel vercel bot commented on 8eb11e2 Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mdx – ./

v2.mdxjs.com
mdx-mdx.vercel.app
mdx-git-main-mdx.vercel.app
mdxjs.com

Please sign in to comment.