Skip to content

Commit 02bfdc5

Browse files
Louis KuczykowskiLouis Kuczykowski
authored andcommitted
finished tc6 but possible bug found in the parser itself
1 parent 86ef330 commit 02bfdc5

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/test/suite/parser.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import * as vscode from 'vscode'
99

1010
describe('Parser Test Suite', () => {
1111
let parser, tree, file;
12+
const fs = require('fs');
13+
1214

1315
// UNPARSED TREE TEST
1416
xdescribe('It initializes correctly', () => {
@@ -53,15 +55,13 @@ describe('Parser Test Suite', () => {
5355
file = path.join(__dirname, '../../../../src/test/test_cases/tc_6/component/App.jsx');
5456
parser = new Parser(file);
5557
tree = parser.parse();
58+
console.log(tree)
5659
});
5760

58-
test('improperly imported child component should exist but show an error', () => {
61+
test("Child component that doesn't exist still shows up on the node tree", () => {
5962
expect(tree.children[0].name).toBe('anotherApp');
6063
expect(tree.children[0].error).not.toBe('');
6164
})
62-
63-
64-
6565
})
6666

6767
// these are the 14 tests we need to test for

src/test/test_cases/tc_6/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react';
33
import { createRoot } from 'react-dom/client';
44
import App from './components/App.jsx';
55

6-
// tests whether the parser still works when a component is given the wrong FilePath
6+
// tests whether the parser still works when a component is given the wrong File path
77

88
const root = createRoot(document.getElementById('root'));
99
root.render(<App />);

src/test/test_cases/tc_6/otherComponent/anotherApp.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from "react";
22

3-
4-
const anotherApp = () => {
3+
export const anotherApp = () => {
54
return (
65
<div>
76
<p>Greetings from inside anotherApp</p>

0 commit comments

Comments
 (0)