Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@tapjs/clock
Advanced tools
A deterministic mock clock for use in tests involving time.
A mock clock will be available at t.clock
. If you call
t.clock.enter()
, it will monkey-patch all the globals to be
tied to the deterministic mock clock implementation. When the
test completes, the patched globals will return to their previous
state automatically.
For example:
t.test('some timers and such', async t => {
t.clock.enter()
let timeoutFired = false
setTimeout(() => (timeoutFired = true), 100)
t.clock.advance(50)
t.equal(timeoutFired, false)
t.clock.advance(50)
t.equal(timeoutFired, true)
})
If you aren't using the @tapjs/after
plugin, then you'll have
to call t.clock.exit()
at some point to restore the global
timers to their previous states.
See clock-mock for full API details.
FAQs
a make believe clock for tests involving time
The npm package @tapjs/clock receives a total of 357 weekly downloads. As such, @tapjs/clock popularity was classified as not popular.
We found that @tapjs/clock demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.