
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Smoketest - pure javascript smoke-test framework. (currently in beta)
Full documentation are not here yet, but base API presents
npm install smoketest --save-dev
bower install smoketest --save-dev
Or just fetch build under dist.
For add framework and tests to your site, just add it right in simple script. Look to the example
But if you want add framework and tests without change your site files, you can use userscripts (tampermonkey / greasemonkey extensions) Look to the example
Just type in console smokeTest.runAll();
You can make typo in camelCase, it is no problem =)
interact methods:
get methods:
core methods:
var click = smokeTest.actions.click;
click('button#submit', optionalCallback);
var inputText = smokeTest.actions.inputText;
inputText('input#login', 'John Doe', optionalCallback);
var focusOn = smokeTest.actions.focusOn;
focusOn('input#password', optionalCallback);
var blur = smokeTest.actions.blur;
blur('input#age', optionalCallback);
var pickInSelect = smokeTest.actions.pickInSelect;
// You can pass option value
pickInSelect('select#car', 'mercedez', optionalCallback);
// You can pass option innerHTML
pickInSelect('select#car', 'Mercedez Benz', optionalCallback);
// Or a number of selected value
pickInSelect('select#car', 2, optionalCallback);
var getText = smokeTest.actions.getText;
getText('div#selectedCar', function (err, text) {
if (err) throw err;
// work with text
});
var getValue = smokeTest.actions.getValue;
getValue('input#surname', function (err, value) {
if (err) throw err;
// work with value
});
var findElement = smokeTest.actions.findElement;
// You can use with default timeout waiting for element presense
findElement('div#main', function (err, element) {
if (err) throw err;
// work with element
});
// Or you can specify need timeout
findElement('div#main', 3000, function (err, element) {
if (err) throw err;
// work with element
});
var waitState = smokeTest.actions.waitState;
waitState(function () {
// this is predicate, it must return boolean value
var loadedCarsInList = document.querySelectorAll('ul#cars>li').length;
return loadedCarsInList === 12;
}, function (err) {
// this is callback, it will called if predicate returns true, until timeout done
if (err) throw err;
// work with successfully loaded car list
}, 5000, 1000); // optional timeout and optional refresh time (wait 5 seconds and check predicate every second)
// every waitState method or findElement process will try every second
smokeTest.actions.setDefaultRefreshTime(1000);
// every waitState method or findElement process will failed after 6 seconds
smokeTest.actions.setDefaultTimeout(6000);
All action methods has promisified version, in example getText:
var getText = smokeTest.actions.promised.getText;
getText('div#carDescription')
.then(function (text) { /* work with text =) */ })
.catch(function (err) { /* handle error =( */ };
All action methods (promisified too) you can use with already found element. It is comfortable for promise chaining:
var promiseActions = smokeTest.actions.promised;
var findElement = promiseActions.findElement;
var click = promiseActions.click;
findElement('#buttonForClick')
.then(button => click(button));
smokeTest.version();
Returns versions of framework and bundled libraries
FAQs
Framework, that allows write functional smoke tests easy
We found that smoketest 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

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.