Skip to content

Commit 6c7d17c

Browse files
committed
Fix mdFilePath test for Windows path compatibility
1 parent f7f6fb4 commit 6c7d17c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/unit/paths.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {expect} from 'chai'
2+
import {resolve} from 'node:path'
23

34
import {
45
articleApiPath,
@@ -86,6 +87,7 @@ describe('paths', function () {
8687

8788
it('mdFilePath resolves to the article working directory', function () {
8889
process.env.DEVCENTER_CLI_CWD = '/tmp/articles'
89-
expect(mdFilePath('my-article')).to.equal('/tmp/articles/my-article.md')
90+
const expected = resolve('/tmp/articles', 'my-article.md')
91+
expect(mdFilePath('my-article')).to.equal(expected)
9092
})
9193
})

0 commit comments

Comments
 (0)