Skip to content

Commit 0963ed2

Browse files
committed
'Resolving merge conflicts'
Merge branch 'dev' into FL-JA/D3-visualization
2 parents 4bb8447 + e45e116 commit 0963ed2

File tree

12 files changed

+208
-32
lines changed

12 files changed

+208
-32
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
/build
3-
/package-lock.json
3+
/package-lock.json
4+
/.vscode-test/

.vscode-test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// .vscode-test.js
2+
const { defineConfig } = require('@vscode/test-cli');
3+
4+
module.exports = defineConfig([
5+
{
6+
label: 'unitTests',
7+
files: 'build/src/test/**/*.test.js',
8+
}
9+
]);

.vscode/launch.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
{
66
"version": "0.2.0",
77
"configurations": [
8+
89
{
910
"name": "Run Extension",
1011
"type": "extensionHost",
@@ -20,7 +21,9 @@
2021
"args": [
2122
"--extensionDevelopmentPath=${workspaceFolder}",
2223
"--extensionTestsPath=${workspaceFolder}/test/suite/index"
23-
]
24+
],
25+
"outFiles": ["${workspaceFolder}/build/*.js"],
26+
"preLaunchTask": "npm: test-compile"
2427
}
2528
]
2629
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cmake.configureOnOpen": false
3+
}

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ vsc-extension-quickstart.md
77
**/jsconfig.json
88
**/*.map
99
**/.eslintrc.json
10+
**/*.js.map

package-lock.json

Lines changed: 159 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"version": "0.0.1",
66
"publisher": "ReactLabyrinthDev",
77
"engines": {
8-
"vscode": "^1.84.0"
8+
"vscode": "^1.85.1"
99
},
1010
"repository": {
1111
"type": "git",
@@ -70,17 +70,20 @@
7070
"scripts": {
7171
"lint": "eslint .",
7272
"pretest": "npm run lint",
73-
"test": "node ./test/runTest.js",
73+
"test": "node ./build/src/test/runTest.js",
74+
"test1": "vscode-test",
7475
"dev": "webpack --watch",
7576
"webpack": "webpack"
7677
},
7778
"devDependencies": {
79+
"@types/glob": "^8.1.0",
7880
"@types/mocha": "^10.0.3",
7981
"@types/node": "18.x",
8082
"@types/react": "^18.2.45",
8183
"@types/react-dom": "^18.2.18",
82-
"@types/vscode": "^1.84.0",
83-
"@vscode/test-electron": "^2.3.6",
84+
"@types/vscode": "^1.85.1",
85+
"@vscode/test-cli": "^0.0.4",
86+
"@vscode/test-electron": "^2.3.8",
8487
"eslint": "^8.54.0",
8588
"glob": "^10.3.10",
8689
"mocha": "^10.2.0",

src/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ export class Parser {
423423
// Case for finding components passed in as props e.g. <Route component={App} />
424424
} else if (
425425
astTokens[i].type.label === 'jsxName' &&
426-
(astTokens[i].value === 'component' ||
426+
(astTokens[i].value === 'Component' ||
427427
astTokens[i].value === 'children') &&
428428
importsObj[astTokens[i + 3].value]
429429
) {

test/runTest.js renamed to src/test/runTest.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
const path = require('path');
1+
import * as path from 'path';
22

3-
const { runTests } = require('@vscode/test-electron');
3+
import { runTests } from '@vscode/test-electron';
44

55
async function main() {
6+
console.log('made it through the line before try block');
67
try {
8+
console.log('inside try block');
79
// The folder containing the Extension Manifest package.json
810
// Passed to `--extensionDevelopmentPath`
9-
const extensionDevelopmentPath = path.resolve(__dirname, '../');
11+
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
12+
13+
console.log('inside try block after first var declare');
1014

1115
// The path to the extension test script
1216
// Passed to --extensionTestsPath
1317
const extensionTestsPath = path.resolve(__dirname, './suite/index');
1418

19+
console.log('inside try block after second var declare');
20+
1521
// Download VS Code, unzip it and run the integration test
1622
await runTests({ extensionDevelopmentPath, extensionTestsPath });
1723
} catch (err) {
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
const assert = require('assert');
1+
import * as assert from 'assert'
22

33
// You can import and use all API from the 'vscode' module
44
// as well as import your extension to test it
5-
const vscode = require('vscode');
5+
import * as vscode from 'vscode'
66
// const myExtension = require('../extension');
77

88
suite('Extension Test Suite', () => {
99
vscode.window.showInformationMessage('Start all tests.');
1010

1111
test('Sample test', () => {
12-
assert.strictEqual(-1, [1, 2, 3].indexOf(5));
12+
assert.strictEqual(-1, [1, 2, 3].indexOf(5)); // false
1313
assert.strictEqual(-1, [1, 2, 3].indexOf(0));
14+
assert.strictEqual(0, [1, 2, 3].indexOf(1)); // true
1415
});
1516
});

0 commit comments

Comments
 (0)