
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
@temporalio/nyc-test-coverage
Advanced tools
@temporalio/nyc-test-coverage
Temporal's TypeScript SDK interceptors and sinks for code coverage with nyc.
npm install mocha nyc
nyc instrument lib lib --in-place
. Make sure you instrument your Workflow code after compiling it with tsc
.import { WorkflowCoverage } from '@temporalio/nyc-test-coverage';
const workflowCoverage = new WorkflowCoverage();
worker = await Worker.create({
connection: nativeConnection,
taskQueue,
workflowsPath: require.resolve("./workflows"),
interceptors: {
workflowModules: [workflowCoverage.interceptorModule]
},
sinks: workflowCoverage.sinks,
});
mergeIntoGlobalCoverage()
to merge your Workflows' code coverage into nyc's global coverage.after(() => {
workflowCoverage.mergeIntoGlobalCoverage();
});
For example, the following is a sample npm script that handles instrumenting and running tests.
The following assumes that npm run build
produces compiled JavaScript in the lib
directory.
{
"test.coverage": "npm run build && nyc instrument lib lib --in-place && nyc --reporter=lcov --reporter=text-summary mocha lib/*.test.js"
}
FAQs
Temporal.io SDK code coverage integration
The npm package @temporalio/nyc-test-coverage receives a total of 49,058 weekly downloads. As such, @temporalio/nyc-test-coverage popularity was classified as popular.
We found that @temporalio/nyc-test-coverage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.