Skip to content

Commit

Permalink
ci: add a workaround for test case on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Dec 9, 2023
1 parent 35aeb51 commit f9cf44e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
dist/
node_modules/
out/
pnpm-lock.yaml
yarn.lock
8 changes: 7 additions & 1 deletion packages/language-server/test/document-link.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* @typedef {import('vscode-languageserver').ProtocolConnection} ProtocolConnection
*/
import assert from 'node:assert/strict'
import process from 'node:process'
import {afterEach, beforeEach, test} from 'node:test'
import {DocumentLinkRequest, InitializeRequest} from 'vscode-languageserver'
import {
Expand Down Expand Up @@ -36,6 +37,8 @@ test('resolve markdown link references', async () => {
textDocument: {uri}
})

const linkReferencePath = fixturePath('node16/link-reference.mdx.md')

assert.deepEqual(result, [
{
range: {
Expand All @@ -57,7 +60,10 @@ test('resolve markdown link references', async () => {
pathText: 'mdx',
resource: {
$mid: 1,
path: fixturePath('node16/link-reference.mdx.md'),
path:
process.platform === 'win32'
? '/' + linkReferencePath
: linkReferencePath,
scheme: 'file'
},
range: {
Expand Down
1 change: 0 additions & 1 deletion packages/vscode-mdx/src/document-drop-edit-provider.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/**
* @typedef {import('mdast').RootContent} RootContent
* @typedef {import('vscode').DocumentDropEditProvider} DocumentDropEditProvider
* @typedef {import('vscode').DataTransferItem} DataTransferItem
*/
Expand Down

0 comments on commit f9cf44e

Please sign in to comment.