
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
dalek-pluginize
Advanced tools
Returns a wrapped Dalek test object to extend with custom asserts and actions
Enables the creation of Dalek plugins for assertions and actions by wrapping the Dalek test object.
The current version of Dalek (<= 1.0.0) does not support the creation of assertion or action plugins to extend the functionality that comes with the library. This shortcoming is already being addressed as part of the DalekJS API proposal for new upcoming version.
The purpose of this library is to temporarily fill in this gap until the new version of Dalek is installed to allow the writing of cleaner and chainable Dalek test code today.
With npm do:
npm install dalek-pluginize --save
var dalekPluginize = require('dalek-pluginize');
dalekPluginize.addAction('showDialog', function(){
return this.click('.dialog');
});
// Namespace plugins similar to `.assert`
dalekPluginize.addAction('ns', 'open', function(path){
return this.open('http://localhost:9000/' + path);
});
// Bulk register custom actions
dalekPluginize.addActions({
showDialog: function() { },
...
});
var ex = require('dalek-pluginize').extend;
module.exports = {
'My Dalek test': function(test) {
ex(test)
.ns.open('test/index.html')
.showDialog()
.assert.visible('.dialog')
.done();
}
}
Adds a new custom action plugin
namespace (optional) namespace for custom action plugin to reside insidepluginName name of the new custom action pluginfn the function to execute. Uses current Dalek test object as its scopeBulk adds new action plugins
namespace (optional) namespace for custom plugin to reside insideconfig an object with key value pairs mapping to plugin name and function callbackAdds a new custom assertion plugin
namespace (optional) namespace for custom assertion plugin to reside insidepluginName name of the new custom assertion pluginfn the function to execute. Uses current Dalek test object as its scopeBulk adds new assertion plugins
namespace (optional) namespace for custom plugin to reside insideconfig an object with key value pairs mapping to plugin name and function callbackExtends a Dalek test object with all registered custom action and assertion plugins
test Dalek test object to wrap with registered custom pluginsCopyright (c) 2014 Hady Osman Licensed under the MIT license.
FAQs
Returns a wrapped Dalek test object to extend with custom asserts and actions
The npm package dalek-pluginize receives a total of 2 weekly downloads. As such, dalek-pluginize popularity was classified as not popular.
We found that dalek-pluginize 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.