Skip to content

Commit

Permalink
test(lib): add c8 ignores for coverage
Browse files Browse the repository at this point in the history
Signed-off-by: euberdeveloper <euberdeveloper@gmail.com>
  • Loading branch information
euberdeveloper committed Jun 12, 2024
1 parent cdaab56 commit b2ad4ee
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions source/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ function _scan<Node extends Dree = Dree>(root: string, path: string, depth: numb
stat = statSync(path);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand All @@ -540,7 +540,7 @@ function _scan<Node extends Dree = Dree>(root: string, path: string, depth: numb
lstat = lstatSync(path);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand Down Expand Up @@ -587,7 +587,7 @@ function _scan<Node extends Dree = Dree>(root: string, path: string, depth: numb
files = sortFiles(files, options.sorted);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand Down Expand Up @@ -658,7 +658,7 @@ function _scan<Node extends Dree = Dree>(root: string, path: string, depth: numb
data = readFileSync(path);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand All @@ -672,7 +672,7 @@ function _scan<Node extends Dree = Dree>(root: string, path: string, depth: numb
}
break;
default:
/* istanbul ignore next */
/* c8 ignore next */
return null;
}

Expand Down Expand Up @@ -707,7 +707,7 @@ async function _scanAsync<Node extends Dree = Dree>(root: string, path: string,
stat = await statAsync(path);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand All @@ -720,7 +720,7 @@ async function _scanAsync<Node extends Dree = Dree>(root: string, path: string,
lstat = await lstatAsync(path);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand Down Expand Up @@ -767,7 +767,7 @@ async function _scanAsync<Node extends Dree = Dree>(root: string, path: string,
files = sortFiles(files, options.sorted);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand Down Expand Up @@ -837,7 +837,7 @@ async function _scanAsync<Node extends Dree = Dree>(root: string, path: string,
data = await readFileAsync(path);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand All @@ -851,7 +851,7 @@ async function _scanAsync<Node extends Dree = Dree>(root: string, path: string,
}
break;
default:
/* istanbul ignore next */
/* c8 ignore next */
return null;
}

Expand Down Expand Up @@ -896,7 +896,7 @@ function _parse(root: string, children: string[], prefix: string, options: Parse
stat = statSync(child);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand All @@ -909,7 +909,7 @@ function _parse(root: string, children: string[], prefix: string, options: Parse
lstat = lstatSync(child);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand Down Expand Up @@ -942,7 +942,7 @@ function _parse(root: string, children: string[], prefix: string, options: Parse
children = sortFiles(children, options.sorted);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand Down Expand Up @@ -983,7 +983,7 @@ async function _parseAsync(root: string, children: string[], prefix: string, opt
stat = await statAsync(child);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand All @@ -996,7 +996,7 @@ async function _parseAsync(root: string, children: string[], prefix: string, opt
lstat = await lstatAsync(child);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand Down Expand Up @@ -1029,7 +1029,7 @@ async function _parseAsync(root: string, children: string[], prefix: string, opt
children = sortFiles(children, options.sorted);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (options.skipErrors) {
return null;
}
Expand Down Expand Up @@ -1137,7 +1137,7 @@ export function parse(path: string, options?: ParseOptions): string {
stat = statSync(root);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (opt.skipErrors) {
return null;
}
Expand All @@ -1150,7 +1150,7 @@ export function parse(path: string, options?: ParseOptions): string {
lstat = lstatSync(root);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (opt.skipErrors) {
return null;
}
Expand All @@ -1167,7 +1167,7 @@ export function parse(path: string, options?: ParseOptions): string {
children = sortFiles(children, opt.sorted);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (opt.skipErrors) {
return null;
}
Expand Down Expand Up @@ -1200,7 +1200,7 @@ export async function parseAsync(path: string, options?: ParseOptions): Promise<
stat = await statAsync(root);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (opt.skipErrors) {
return null;
}
Expand All @@ -1213,7 +1213,7 @@ export async function parseAsync(path: string, options?: ParseOptions): Promise<
lstat = await lstatAsync(root);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (opt.skipErrors) {
return null;
}
Expand All @@ -1230,7 +1230,7 @@ export async function parseAsync(path: string, options?: ParseOptions): Promise<
children = sortFiles(children, opt.sorted);
}
catch (exception) {
/* istanbul ignore next */
/* c8 ignore next */
if (opt.skipErrors) {
return null;
}
Expand Down

0 comments on commit b2ad4ee

Please sign in to comment.