@@ -11,9 +11,9 @@ logDriver({ level: false });
11
11
describe ( 'convertLcovToCoveralls' , ( ) => {
12
12
it ( 'should convert a simple lcov file' , done => {
13
13
delete process . env . TRAVIS ;
14
- const lcovpath = path . join ( __dirname , '/. ./fixtures/onefile.lcov' ) ;
14
+ const lcovpath = path . join ( __dirname , './fixtures/onefile.lcov' ) ;
15
15
const input = fs . readFileSync ( lcovpath , 'utf8' ) ;
16
- const libpath = path . join ( __dirname , '/. ./fixtures/lib' ) ;
16
+ const libpath = path . join ( __dirname , './fixtures/lib' ) ;
17
17
convertLcovToCoveralls ( input , { filepath : libpath } , ( err , output ) => {
18
18
should . not . exist ( err ) ;
19
19
output . source_files [ 0 ] . name . should . equal ( 'index.js' ) ;
@@ -37,7 +37,7 @@ describe('convertLcovToCoveralls', () => {
37
37
process . env . COVERALLS_FLAG_NAME = 'FLAG_NAME' ;
38
38
39
39
getOptions ( ( err , options ) => {
40
- const lcovpath = path . join ( __dirname , '/. ./fixtures/onefile.lcov' ) ;
40
+ const lcovpath = path . join ( __dirname , './fixtures/onefile.lcov' ) ;
41
41
const input = fs . readFileSync ( lcovpath , 'utf8' ) ;
42
42
const libpath = 'fixtures/lib' ;
43
43
@@ -56,11 +56,12 @@ describe('convertLcovToCoveralls', () => {
56
56
} ) ;
57
57
} ) ;
58
58
} ) ;
59
+
59
60
it ( 'should work with a relative path as well' , done => {
60
61
delete process . env . TRAVIS ;
61
- const lcovpath = path . join ( __dirname , '/. ./fixtures/onefile.lcov' ) ;
62
+ const lcovpath = path . join ( __dirname , './fixtures/onefile.lcov' ) ;
62
63
const input = fs . readFileSync ( lcovpath , 'utf8' ) ;
63
- const libpath = 'fixtures/lib' ;
64
+ const libpath = 'test/ fixtures/lib' ;
64
65
convertLcovToCoveralls ( input , { filepath : libpath } , ( err , output ) => {
65
66
should . not . exist ( err ) ;
66
67
output . source_files [ 0 ] . name . should . equal ( 'index.js' ) ;
@@ -71,7 +72,7 @@ describe('convertLcovToCoveralls', () => {
71
72
72
73
it ( 'should convert absolute input paths to relative' , done => {
73
74
delete process . env . TRAVIS ;
74
- const lcovpath = path . join ( __dirname , '/. ./fixtures/istanbul.lcov' ) ;
75
+ const lcovpath = path . join ( __dirname , './fixtures/istanbul.lcov' ) ;
75
76
const input = fs . readFileSync ( lcovpath , 'utf8' ) ;
76
77
const libpath = '/Users/deepsweet/Dropbox/projects/svgo/lib' ;
77
78
const sourcepath = path . resolve ( libpath , 'svgo/config.js' ) ;
@@ -100,7 +101,7 @@ describe('convertLcovToCoveralls', () => {
100
101
101
102
it ( 'should handle branch coverage data' , done => {
102
103
process . env . TRAVIS_JOB_ID = - 1 ;
103
- const lcovpath = path . join ( __dirname , '/. ./fixtures/istanbul.lcov' ) ;
104
+ const lcovpath = path . join ( __dirname , './fixtures/istanbul.lcov' ) ;
104
105
const input = fs . readFileSync ( lcovpath , 'utf8' ) ;
105
106
const libpath = '/Users/deepsweet/Dropbox/projects/svgo/lib' ;
106
107
const sourcepath = path . resolve ( libpath , 'svgo/config.js' ) ;
@@ -129,7 +130,7 @@ describe('convertLcovToCoveralls', () => {
129
130
130
131
it ( 'should ignore files that do not exists' , done => {
131
132
delete process . env . TRAVIS ;
132
- const lcovpath = path . join ( __dirname , '/. ./fixtures/istanbul.lcov' ) ;
133
+ const lcovpath = path . join ( __dirname , './fixtures/istanbul.lcov' ) ;
133
134
const input = fs . readFileSync ( lcovpath , 'utf8' ) ;
134
135
const libpath = '/Users/deepsweet/Dropbox/projects/svgo/lib' ;
135
136
const sourcepath = path . resolve ( libpath , 'svgo/config.js' ) ;
@@ -158,7 +159,7 @@ describe('convertLcovToCoveralls', () => {
158
159
159
160
it ( 'should parse file paths concatenated by typescript and ng 2' , done => {
160
161
process . env . TRAVIS_JOB_ID = - 1 ;
161
- const lcovpath = path . join ( __dirname , '/. ./fixtures/istanbul.remap.lcov' ) ;
162
+ const lcovpath = path . join ( __dirname , './fixtures/istanbul.remap.lcov' ) ;
162
163
const input = fs . readFileSync ( lcovpath , 'utf8' ) ;
163
164
const libpath = '/Users/deepsweet/Dropbox/projects/svgo/lib' ;
164
165
const sourcepath = path . resolve ( libpath , 'svgo/config.js' ) ;
0 commit comments