
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
dustjs-test-helper
Advanced tools
Test helpers to help test custom extensions (custom helpers, filter, etc.) of dustjs-linkedin.
before
and after
hooks so you can modify or spy on the chunk, context, params, etc internals$ npm install --save-dev dustjs-test-helper
Note: the test helper has a peer-dependency on dustjs-linkedin, which means you should have it installed in your repo as a dependency/dev dependency
you will likely want to use the test
method. There is one specific for testing Dust's @helpers
and a different one for Dust filters.
@see tests/example for an example using sinon, mocha and chai.
var dustTester = require('dustjs-test-helper');
dustTesters.helpers.test(setupObject, function(err, out) {
// same as a dust.render callback
});
test a custom helper using the fake template {@setupObjectName/}
. use before
hooks to modify this further.
var dustTester = require('dustjs-test-helper');
dustTesters.filters.test(setupObject, function(err, out) {
// same as a dust.render callback
});
test a custom filter using the fake template {key|setupObjectName}
. use before
hooks to modify this further.
Type: object
Type:string
name of the @helper or |filter. Dust looks for this name in the dust.helpers
and dust.filters
objects and also matches what is used in the template
Type:function
the implementation of the helper or filter. The helper function signature is (chunk, context, bodies, params) while the filter function signature is (data)
Type:function
Default: function(){}
hook to be called before fn
. gets the same params. useful for spying, setup, modifying, etc.
Type:function
Default: function(){}
hook to be called after fn
. gets the same params. useful for asserting, doing cleanup, etc.
Type:object
Default: {}
context used to render the fake template
MIT [jimmyhchan]
FAQs
helper methods for testing dust
The npm package dustjs-test-helper receives a total of 0 weekly downloads. As such, dustjs-test-helper popularity was classified as not popular.
We found that dustjs-test-helper 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
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.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.