
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
feather-test-browser
Advanced tools
Lightweight test coverage for browser-ready code
Refactor safely -- without configuring a burdensome test suite
Runs on the easy-to-use feather-test library
$ npm install feather-test-browser --save-dev
myProject/test/specs/one.spec.js
describe('gizmo is a mogwai', function () {
describe('when you feed him after midnight', function () {
describe('he becomes a gremlin', function (expect) {
expect(skin).not.toBe('furry');
expect(temperament).toContain('angry');
expect(explosions).toBeGreaterThan(99, 'explosions caused by gremlins');
});
});
});
myProject/test/specs/two.spec.js
// example of an asynchronous test
describe('teddy ruxpin is the creepiest bear ever', function () {
describe('he blinks twice every 3 seconds', function (expect, done) {
activateTeddy();
setTimeout(function () {
expect(timesBlinked).toBe(4);
done();
}, 6000);
});
});
myProject/package.json
{
"scripts": {
"test": "node ./test/run"
}
}
myProject/
|--test/
| |--specs/
| | |--one.spec.js
| | |--two.spec.js
| |--run.js
|--src/
| |--etc.
|--package.json
myProject/test/run.js
var FeatherTestBrowser = require('feather-test-browser');
// create a new test suite with your spec files
var myTests = new FeatherTestBrowser({
helpers: './helpers',
specs: './specs'
});
// run your tests and get a link to run them again in any browser
// (optional callback)
myTests.run(callback);
$ cd myProject
$ npm test
// You will be given a URL that you can open in any browser on your machine
See feather-test for full documentation on assertions, matchers, and other options that are available in feather-test-browser.
The following plugins are added in browser mode
Load external scripts into your spec environment at runtime.
file://
protocol)describe('try loading a script', function (expect, done) {
// ext files each execute `window.foo++`
window.foo = 0;
external.loadScript('/Users/me/Projects/feather-test-browser/ext1.js', function () {
expect(window.foo).toBe(1);
});
external.loadScript('/Users/me/Projects/feather-test-browser/ext2.js', function () {
expect(window.foo).toBe(2);
done();
});
});
FAQs
Lightweight test coverage for browser-ready code
The npm package feather-test-browser receives a total of 0 weekly downloads. As such, feather-test-browser popularity was classified as not popular.
We found that feather-test-browser demonstrated a not healthy version release cadence and project activity because the last version was released 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.