File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ import * as vscode from 'vscode'
99
1010describe ( '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' ) ;
6063expect ( tree . children [ 0 ] . error ) . not . toBe ( '' ) ;
6164 } )
62-
63-
64-
6565 } )
6666
6767 // these are the 14 tests we need to test for
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import React from 'react';
33import { createRoot } from 'react-dom/client' ;
44import 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
88const root = createRoot ( document . getElementById ( 'root' ) ) ;
99root . render ( < App /> ) ;
Original file line number Diff line number Diff line change 11import React from "react" ;
22
3-
4- const anotherApp = ( ) => {
3+ export const anotherApp = ( ) => {
54 return (
65 < div >
76 < p > Greetings from inside anotherApp</ p >
You can’t perform that action at this time.
0 commit comments