Skip to content

Commit a37c8c7

Browse files
committed
remove snapshot dynamicism
1 parent 467ec53 commit a37c8c7

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

packages/core/__tests__/language-server/diagnostic-augmentation.test.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ describe('Language Server: Diagnostic Augmentation', () => {
370370
"line": 115,
371371
},
372372
},
373-
"uri": "file:///Users/machty/code/glint/packages/template/-private/dsl/emit.d.ts",
373+
"uri": "file:///PATH_TO_MODULE/@glint/template/-private/dsl/emit.d.ts",
374374
},
375375
"message": "Arguments for the rest parameter 'values' were not provided.",
376376
},
@@ -700,7 +700,7 @@ describe('Language Server: Diagnostic Augmentation', () => {
700700
"line": 18,
701701
},
702702
},
703-
"uri": "file:///Users/machty/code/glint/packages/template/-private/integration.d.ts",
703+
"uri": "file:///PATH_TO_MODULE/@glint/template/-private/integration.d.ts",
704704
},
705705
"message": "'[InvokeDirect]' is declared here.",
706706
},
@@ -1312,7 +1312,7 @@ describe('Language Server: Diagnostic Augmentation', () => {
13121312
"line": 79,
13131313
},
13141314
},
1315-
"uri": "file:///Users/machty/code/glint/packages/template/-private/keywords/-bind-invokable.d.ts",
1315+
"uri": "file:///PATH_TO_MODULE/@glint/template/-private/keywords/-bind-invokable.d.ts",
13161316
},
13171317
"message": "The last overload is declared here.",
13181318
},
@@ -1355,7 +1355,7 @@ describe('Language Server: Diagnostic Augmentation', () => {
13551355
"line": 79,
13561356
},
13571357
},
1358-
"uri": "file:///Users/machty/code/glint/packages/template/-private/keywords/-bind-invokable.d.ts",
1358+
"uri": "file:///PATH_TO_MODULE/@glint/template/-private/keywords/-bind-invokable.d.ts",
13591359
},
13601360
"message": "The last overload is declared here.",
13611361
},
@@ -1398,7 +1398,7 @@ describe('Language Server: Diagnostic Augmentation', () => {
13981398
"line": 79,
13991399
},
14001400
},
1401-
"uri": "file:///Users/machty/code/glint/packages/template/-private/keywords/-bind-invokable.d.ts",
1401+
"uri": "file:///PATH_TO_MODULE/@glint/template/-private/keywords/-bind-invokable.d.ts",
14021402
},
14031403
"message": "The last overload is declared here.",
14041404
},

test-packages/test-utils/src/project.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import { Position, Range, TextEdit } from '@volar/language-server';
1515

1616
const require = createRequire(import.meta.url);
1717
const dirname = path.dirname(fileURLToPath(import.meta.url));
18+
const pathToTemplatePackage = pathUtils.normalizeFilePath(
19+
path.resolve(dirname, '../../../packages/template')
20+
);
21+
const fileUriToTemplatePckage = pathUtils.filePathToUri(pathToTemplatePackage);
1822
const ROOT = pathUtils.normalizeFilePath(path.resolve(dirname, '../../ephemeral'));
1923

2024
// You'd think this would exist, but... no? Accordingly, supply a minimal
@@ -151,7 +155,8 @@ export class Project {
151155
volarEmbeddedContentUri.toString(),
152156
`volar-embedded-content://URI_ENCODED_PATH_TO/FILE`
153157
)
154-
.replaceAll(this.fileURI('.'), 'file:///PATH_TO_EPHEMERAL_TEST_PROJECT');
158+
.replaceAll(this.fileURI('.'), 'file:///PATH_TO_EPHEMERAL_TEST_PROJECT')
159+
.replaceAll(fileUriToTemplatePckage, 'file:///PATH_TO_MODULE/@glint/template')
155160

156161
return JSON.parse(normalized);
157162
}

0 commit comments

Comments
 (0)