awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目MCP 服务器关于排名机制媒体报道
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
istanbuljs avatar

istanbuljs/nyc

0
View on GitHub↗
5,746 星标·365 分支·JavaScript·isc·10 次浏览istanbul.js.org↗

Nyc

nyc is a JavaScript code coverage tool and command-line interface that instruments source files to track the execution of lines, branches, and functions during test runs. It acts as a wrapper for Node.js test runners, intercepting the module loading process to collect coverage data.

The tool functions as a coverage data merger and build gating tool, allowing users to combine results from multiple independent test runs or child processes into a single unified report. It can automatically fail the build process if code coverage percentages fall below defined minimum thresholds.

The project supports modern JavaScript and TypeScript by using source maps to link coverage data from transpiled code back to the original source files. It provides a multi-format reporting pipeline that outputs results as HTML, LCOV, JSON, XML, and plain text. Additional capabilities include glob-pattern file filtering, disk-based caching of instrumented files, and integration with testing frameworks such as Jest, Mocha, AVA, and tap.

Features

  • Code Coverage - Instruments JavaScript and TypeScript source files to track executed lines, branches, and functions during test runs.
  • Threshold Enforcements - Fails the build process when code coverage percentages fall below minimum target thresholds for branches, lines, and functions.
  • Coverage Data Aggregators - Combines raw coverage data from separate test suites or independent runs into a single consolidated report.
  • Code Instrumentation Utilities - Instruments source files during execution to collect real-time code coverage statistics.
  • Source Code Mapping - Maps coverage data from transpiled code back to the original source files using source maps.
  • Transpilation Mapping - Maps coverage data from compiled TypeScript or ES2015+ code back to original source files using source maps.
  • Source Map Resolution - Preserves source maps during code rewriting to map coverage data from transpiled TypeScript or ES2015+ back to original lines.
  • Runtime Module Hooking - Instruments source files on-the-fly by intercepting the Node.js module loading process with a custom require hook.
  • Build Gating Tools - Acts as a validator that fails the build process when code coverage percentages fall below defined minimum thresholds.
  • Code Coverage Tools - Provides a command-line tool to instrument JavaScript source files and track the execution of lines, branches, and functions.
  • Test Runner Wrappers - Functions as a wrapper for Node.js test runners, intercepting the module loading process to collect coverage data.
  • Test Runner Integrations - Connects with common testing frameworks to collect unified coverage data automatically via the command line.
  • HTML Visualizations - Produces a browsable HTML report showing per-file code coverage with visual highlighting.
  • Pre-instrumentation - Instruments source files ahead of time to facilitate coverage tracking via source maps.
  • Subprocess Instrumentation - Captures and merges code coverage data from multiple child processes spawned during tests.
  • TypeScript Instrumentation - Transpiles TypeScript source files to ensure compatible instrumentation and coverage tracking.
  • Glob Pattern Selectors - Allows selecting source files for instrumentation using include and exclude glob patterns.
  • Modern JavaScript Instrumentation - Transpiles modern JavaScript syntax to ensure compatible instrumentation and coverage tracking.
  • Coverage Summaries - Provides coverage summaries and file-level statistics directly to the command line in text or TeamCity formats.
  • Analysis Report Serialization - Serializes coverage analysis results into multiple human-readable and machine-readable formats.
  • Reporting Plugins - Uses a plugin-based architecture to output coverage results in multiple formats including HTML, LCOV, JSON, and XML.
  • Coverage Exclusions - Provides mechanisms to ignore specific lines, blocks, or files from coverage metrics using inline hints and configuration.
  • Report Generators - Transforms raw coverage data into diverse report formats such as HTML, LCOV, JSON, and XML.
  • Detailed JSON Reporting - Produces detailed JSON reports containing per-file coverage data for statements, functions, and branches.
  • Summary Reports - Outputs a concise JSON summary containing aggregate coverage percentages.
  • Test Coverage Collections - Captures and merges coverage metrics from child processes spawned during the execution of tests.
  • Testing and Quality Assurance - Command line interface for code coverage.
  • 测试框架 - CLI for Istanbul coverage.

Star 历史

istanbuljs/nyc 的 Star 历史图表istanbuljs/nyc 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

常见问题解答

istanbuljs/nyc 是做什么的?

nyc is a JavaScript code coverage tool and command-line interface that instruments source files to track the execution of lines, branches, and functions during test runs. It acts as a wrapper for Node.js test runners, intercepting the module loading process to collect coverage data.

istanbuljs/nyc 的主要功能有哪些?

istanbuljs/nyc 的主要功能包括:Code Coverage, Threshold Enforcements, Coverage Data Aggregators, Code Instrumentation Utilities, Source Code Mapping, Transpilation Mapping, Source Map Resolution, Runtime Module Hooking。

istanbuljs/nyc 有哪些开源替代品?

istanbuljs/nyc 的开源替代品包括: gotwarlost/istanbul — Istanbul is a JavaScript code coverage tool and instrumentation engine that measures the execution of statements,… jacoco/jacoco — JaCoCo is a Java code coverage tool and bytecode instrumenter that measures which parts of source code are executed… colszowka/simplecov — SimpleCov is a Ruby code coverage tool and analysis engine used to track which lines, branches, and methods of code… jestjs/jest — Jest is a JavaScript testing framework designed for writing and running automated test suites to verify the… avajs/ava — Ava is a test runner for JavaScript and TypeScript designed to execute test suites with a focus on concurrency and… smartystreets/goconvey — GoConvey is a behavioral testing framework for the Go programming language that provides a test runner, a code…

Nyc 的开源替代方案

相似的开源项目,按与 Nyc 的功能重合度排序。
  • gotwarlost/istanbulgotwarlost 的头像

    gotwarlost/istanbul

    8,662在 GitHub 上查看↗

    Istanbul is a JavaScript code coverage tool and instrumentation engine that measures the execution of statements, lines, functions, and branches. It functions as a test coverage analysis tool capable of monitoring code across unit, functional, and browser tests to identify untested areas of a codebase. The project distinguishes itself through a transparent instrumentation engine that uses module loader hooks to inject tracking code without requiring manual source modifications. It supports distributed test reporting by aggregating fragmented coverage data from multiple concurrent processes in

    JavaScript
    在 GitHub 上查看↗8,662
  • jacoco/jacocojacoco 的头像

    jacoco/jacoco

    4,580在 GitHub 上查看↗

    JaCoCo is a Java code coverage tool and bytecode instrumenter that measures which parts of source code are executed during tests. It functions as a runtime agent to monitor application execution on the fly or as a library for offline bytecode instrumentation, allowing it to capture execution data in environments where runtime agents are restricted. The project distinguishes itself by providing both dynamic and static instrumentation paths to track execution. It includes a runtime agent for on-the-fly monitoring and the ability to modify compiled class files before execution. It further enable

    Javabytecodecoveragegroovy
    在 GitHub 上查看↗4,580
  • colszowka/simplecovcolszowka 的头像

    colszowka/simplecov

    4,902在 GitHub 上查看↗

    SimpleCov is a Ruby code coverage tool and analysis engine used to track which lines, branches, and methods of code execute during tests. It functions as a coverage threshold enforcer and test suite aggregator, recording execution data to identify untested areas of an application. The tool distinguishes itself through the ability to merge coverage results from parallel worker processes and subprocesses into a single unified report. It supports baseline comparison to detect coverage regressions and can gather data from code executed via dynamic evaluation methods, such as those used in templat

    Ruby
    在 GitHub 上查看↗4,902
  • jestjs/jestjestjs 的头像

    jestjs/jest

    45,448在 GitHub 上查看↗

    Jest is a JavaScript testing framework designed for writing and running automated test suites to verify the correctness of JavaScript and TypeScript code. It functions as a comprehensive toolset that integrates a test runner, a mocking and spying library, a snapshot testing tool, and a code coverage tool. The framework distinguishes itself through snapshot testing, which records the serialized state of data structures to detect regressions in future executions. It also includes a mocking and spying library for simulating external dependencies and tracking function calls to isolate code during

    TypeScripteasyexpectationfacebook
    在 GitHub 上查看↗45,448
  • 查看 Nyc 的所有 30 个替代方案→