-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add relative lcov path support (#33)
* fix changelog link * create wrappers and interfaces * use wrappers in a type safe way * cleanup tests are increased type safety * update wrapper interfaces * add alternative source file compare * add relative path option with multi os support * add new setting to readme, cleanup english * add tests to cover absolute and relative modes * make readme more descriptive for alt option
- Loading branch information
Showing
11 changed files
with
290 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
import {readFile as readFileFS} from "fs"; | ||
|
||
export function readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void) { | ||
return readFileFS(filename, callback); | ||
} | ||
export interface FsInterface { | ||
readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; | ||
} | ||
|
||
export class fs implements FsInterface { | ||
public readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void { | ||
return readFileFS(filename, callback); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
"use strict"; | ||
|
||
import {LcovSection, source} from "lcov-parse"; | ||
import {LcovSection, source as sourceLcovParse} from "lcov-parse"; | ||
|
||
export function lcovParse(file: string, cb: (err: Error, data: Array<LcovSection>) => void): void { | ||
return source(file, cb); | ||
export interface LcovParseInterface { | ||
source(file: string, cb: (err: Error, data: Array<LcovSection>) => void): void; | ||
} | ||
|
||
export class lcovParse implements LcovParseInterface { | ||
public source(file: string, cb: (err: Error, data: Array<LcovSection>) => void): void { | ||
return sourceLcovParse(file, cb); | ||
} | ||
} |
Oops, something went wrong.