diff --git a/packages/mdx/test/compile.js b/packages/mdx/test/compile.js index f11a6c486..1c96f3048 100644 --- a/packages/mdx/test/compile.js +++ b/packages/mdx/test/compile.js @@ -999,10 +999,10 @@ test('@mdx-js/mdx: compile', async function (t) { 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 expected = base.pathname + 'unknown.mdx:2:3' + const actual = match?.[1].split(/\\|\//g).join('/') + return actual === expected + } ) await fs.unlink(url)