summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorbscan <10503608+bscan@users.noreply.github.com>2022-02-21 21:05:04 -0500
committerbscan <10503608+bscan@users.noreply.github.com>2022-02-21 21:05:04 -0500
commit66b1c3cf80f88a7ad28e279eff58b3560532bf4e (patch)
tree33240fd79cfd6e1023635387bb2343a73fc25846 /client
parentdbca05bd2a064ab3383ee4f387e35963e4efcf1b (diff)
downloadPerlNavigator-66b1c3cf80f88a7ad28e279eff58b3560532bf4e.zip
Better resolution of explicitly marked methods, support for SUPER, and starting to clean up tests
Diffstat (limited to 'client')
-rw-r--r--client/src/test/completion.test.ts2
-rw-r--r--client/src/test/diagnostics.test.ts2
-rw-r--r--client/src/test/helper.ts6
-rw-r--r--client/testFixture/completion.txt0
-rw-r--r--client/testFixture/diagnostics.txt1
5 files changed, 6 insertions, 5 deletions
diff --git a/client/src/test/completion.test.ts b/client/src/test/completion.test.ts
index f355078..29786f1 100644
--- a/client/src/test/completion.test.ts
+++ b/client/src/test/completion.test.ts
@@ -8,7 +8,7 @@ import * as assert from 'assert';
import { getDocUri, activate } from './helper';
suite('Should do completion', () => {
- const docUri = getDocUri('completion.txt');
+ const docUri = getDocUri('mainTest.pl');
test('Completes JS/TS in txt file', async () => {
await testCompletion(docUri, new vscode.Position(0, 0), {
diff --git a/client/src/test/diagnostics.test.ts b/client/src/test/diagnostics.test.ts
index 1aa8a36..9683eef 100644
--- a/client/src/test/diagnostics.test.ts
+++ b/client/src/test/diagnostics.test.ts
@@ -8,7 +8,7 @@ import * as assert from 'assert';
import { getDocUri, activate } from './helper';
suite('Should get diagnostics', () => {
- const docUri = getDocUri('diagnostics.txt');
+ const docUri = getDocUri('mainTest.pl');
test('Diagnoses uppercase texts', async () => {
await testDiagnostics(docUri, [
diff --git a/client/src/test/helper.ts b/client/src/test/helper.ts
index 6e6724d..b771c9b 100644
--- a/client/src/test/helper.ts
+++ b/client/src/test/helper.ts
@@ -12,11 +12,11 @@ export let documentEol: string;
export let platformEol: string;
/**
- * Activates the vscode.lsp-sample extension
+ * Activates the bscan.perlnavigator extension
*/
export async function activate(docUri: vscode.Uri) {
// The extensionId is `publisher.name` from package.json
- const ext = vscode.extensions.getExtension('vscode-samples.lsp-sample')!;
+ const ext = vscode.extensions.getExtension('bscan.perlnavigator')!;
await ext.activate();
try {
doc = await vscode.workspace.openTextDocument(docUri);
@@ -32,7 +32,7 @@ async function sleep(ms: number) {
}
export const getDocPath = (p: string) => {
- return path.resolve(__dirname, '../../testFixture', p);
+ return path.resolve(__dirname, '../../../testWorkspace', p);
};
export const getDocUri = (p: string) => {
return vscode.Uri.file(getDocPath(p));
diff --git a/client/testFixture/completion.txt b/client/testFixture/completion.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/client/testFixture/completion.txt
diff --git a/client/testFixture/diagnostics.txt b/client/testFixture/diagnostics.txt
new file mode 100644
index 0000000..d910cfb
--- /dev/null
+++ b/client/testFixture/diagnostics.txt
@@ -0,0 +1 @@
+ANY browsers, ANY OS. \ No newline at end of file