Skip to content

Commit 80fa5d6

Browse files
committed
test: disable lspResolver test on nonmac, add techdebt test
1 parent 05f3a2b commit 80fa5d6

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

packages/core/src/test/shared/lsp/lspResolver.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ describe('lspResolver', function () {
5959
let fallbackStub: sinon.SinonStub
6060
let manifest: Manifest
6161
let versionRange: Range
62+
let isMac: boolean // TODO: remove this check once LSPResolver supports other OS.
6263

6364
before(function () {
65+
isMac = process.platform === 'darwin'
6466
remoteStub = sinon.stub(LanguageServerResolver.prototype, 'fetchRemoteServer' as any)
6567
localStub = sinon.stub(LanguageServerResolver.prototype, 'getLocalServer' as any)
6668
fallbackStub = sinon.stub(LanguageServerResolver.prototype, 'getFallbackServer' as any)
@@ -91,6 +93,9 @@ describe('lspResolver', function () {
9193
})
9294

9395
it('tries local cache first', async function () {
96+
if (!isMac) {
97+
this.skip()
98+
}
9499
localStub.resolves(lspResult('cache'))
95100

96101
const r = await new LanguageServerResolver(manifest, serverName, versionRange).resolve()
@@ -105,6 +110,9 @@ describe('lspResolver', function () {
105110
})
106111

107112
it('tries fetching remote if cache fails', async function () {
113+
if (!isMac) {
114+
this.skip()
115+
}
108116
localStub.rejects(new Error('not found'))
109117
remoteStub.resolves(lspResult('remote'))
110118

@@ -128,6 +136,9 @@ describe('lspResolver', function () {
128136
})
129137

130138
it('tries fallback version if both remote and cache fail', async function () {
139+
if (!isMac) {
140+
this.skip()
141+
}
131142
localStub.rejects(new Error('not found'))
132143
remoteStub.rejects(new Error('not found'))
133144
fallbackStub.resolves(lspResult('fallback'))
@@ -158,6 +169,9 @@ describe('lspResolver', function () {
158169
})
159170

160171
it('rejects if local, remote, and fallback all reject', async function () {
172+
if (!isMac) {
173+
this.skip()
174+
}
161175
localStub.rejects(new Error('not found'))
162176
remoteStub.rejects(new Error('not found'))
163177
fallbackStub.rejects(new Error('not found'))

packages/core/src/test/techdebt.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,11 @@ describe('tech debt', function () {
3939
// This is relevant for the use of `fs.cpSync` in the copyFiles scripts.
4040
assert.ok(semver.lt(minNodejs, '18.0.0'), 'with node18+, we can remove the dependency on @types/node@18')
4141
})
42+
43+
it('allow lspResolver tests to run on all platforms', function () {
44+
fixByDate(
45+
'03-01-2025',
46+
'allow lspResolver tests to run on all platforms once it supports it. Remove the `isMac` check in core/src/test/shared/lsp/lspResolver.test.ts'
47+
)
48+
})
4249
})

0 commit comments

Comments
 (0)