File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ module.exports.analyze = (source) => {
3636
3737 if ( Array . isArray ( source ) ) {
3838 source . forEach ( ( filePath ) => {
39- let fullPath = path . resolve ( filePath )
39+ let fullPath = path . resolve ( __dirname , filePath )
4040 let content = read . sync ( fullPath , 'utf8' )
4141 result = escomplex . analyse ( content )
4242 report = sanitize ( path . basename ( filePath ) , filePath , result )
Original file line number Diff line number Diff line change @@ -67,23 +67,23 @@ const properties = [
6767describe ( 'inspekter-plugin-javascript' , ( ) => {
6868 describe ( 'analyze' , ( ) => {
6969 it ( 'should always return an array' , ( ) => {
70- const source = [ 'fixtures/file1.js' ]
70+ const source = [ 'test/ fixtures/file1.js' ]
7171 const actual = ipj . analyze ( source )
7272
7373 expect ( actual ) . to . be . an ( 'array' )
7474 expect ( actual ) . to . have . lengthOf ( 1 )
7575 } )
7676
7777 it ( 'should return one report object for each file' , ( ) => {
78- const source = [ 'fixtures/file1.js' , 'fixtures/file2.js' ]
78+ const source = [ 'test/ fixtures/file1.js' , 'test/ fixtures/file2.js' ]
7979 const actual = ipj . analyze ( source )
8080
8181 expect ( actual ) . to . be . an ( 'array' )
8282 expect ( actual ) . to . have . lengthOf ( 2 )
8383 } )
8484
8585 it ( 'should return an object with all standard properties' , ( ) => {
86- const source = [ 'fixtures/file1.js' ]
86+ const source = [ 'test/ fixtures/file1.js' ]
8787 const actual = ipj . analyze ( source ) [ 0 ]
8888
8989 properties . forEach ( ( property ) => {
You can’t perform that action at this time.
0 commit comments