Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzz range branch #21

Open
wants to merge 21 commits into
base: master
from
Open
Changes from 2 commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -0,0 +1,11 @@
declare module NodeJS {
interface Global {
__coverage__: {
[filePath: string]: {
s: { [n: string]: number };
f: { [n: string]: number };
b: { [n: string]: number[] };
};
};
}
}
@@ -19,22 +19,15 @@ class Worker {

getTotalCoverage() {
let total = 0;
// @ts-ignore
for (const filePath in global["__coverage__"]) {
// @ts-ignore
for (const s in global["__coverage__"][filePath]['s']) {
// @ts-ignore
total += global["__coverage__"][filePath]['s'][s] ? 1 : 0;
for (const filePath in global.__coverage__) {
for (const s in global.__coverage__[filePath].s) {
total += global.__coverage__[filePath].s[s] ? 1 : 0;
}
// @ts-ignore
for (const f in global["__coverage__"][filePath]['f']) {
// @ts-ignore
total += global["__coverage__"][filePath]['f'][f] ? 1 : 0;
for (const f in global.__coverage__[filePath].f) {
total += global.__coverage__[filePath].f[f] ? 1 : 0;
}
// @ts-ignore
for (const b in global["__coverage__"][filePath]['b']) {
// @ts-ignore
for (const i of global["__coverage__"][filePath]['b'][b]) {
for (const b in global.__coverage__[filePath].b) {
for (const i of global.__coverage__[filePath].b[b]) {
total += i ? 1 : 0;
}
}
@@ -44,8 +37,7 @@ class Worker {
}

dump_coverage() {
// @ts-ignore
const data = JSON.stringify(global["__coverage__"]);
const data = JSON.stringify(global.__coverage__);
if (!fs.existsSync('./.nyc_output')){
fs.mkdirSync('./.nyc_output');
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.