Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
A minimal test runner for programmers.
// my-fancy-suite.js
// Because globals are BAD.
import test from 'triala'
// Because there is no point in reinventing the wheel.
import assert from 'assert'
// Define your suite.
test('My fancy suite', class {
// Define some standard hooks.
async _before { console.log('I will be run before the suite.') }
async _after { console.log('I will be run after the suite.') }
async _beforeEach { console.log('I will be run before each test.') }
async _afterEach () { console.log('I will be run after each test.') }
// Prefix helper methods with '_'.
async _timeout (ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
//
// Define your tests.
//
'It should pass' () {
assert.ok('Passing through')
}
'It should throw error' () {
throw new Error('You shall not pass!')
}
async 'It should pass after some time' () {
await this._timeout(1000)
assert.ok('Passing through')
}
async 'It should fail after some time' () {
await this._timeout(1000)
assert.fail('You shall not pass!')
}
// Prefix with 'm ' (mute) to disable a test.
// Prefix with 's ' (solo) to diable all other tests.
// Prefixes are case insensitive. Multiple solos are supported.
'm It will not be run' () {
assert.fail('Does not matter.')
}
})
Just run the file:
node my-fancy-suite.js
For verbose mode:
node my-fancy-suite.js -v
FAQs
A minimal test runner for programmers.
The npm package triala receives a total of 13 weekly downloads. As such, triala popularity was classified as not popular.
We found that triala demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.