Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@dequelabs/amaze-tdd
Advanced tools
A tool for writing functional front-end tests for Amaze™ overlays.
This is a set of tools that will allow for test-driven development using the following technologies:
It contains everything you need to write functional tests for remote URLs.
Install the testing suite into your project root directory with:
npm install @dequelabs/amaze-tdd --save
Ensure the testing suite is required at the top of the test. We use ES2016. Instantiate a global variable for Browser.
var Amaze = require('@dequelabs/amaze-tdd');
var Browser;
var $;
Instantiate the browser object in the suiteSetup
function. You should look at another test to see an example.
Browser = Amaze.Client.build();
Optionally, you may instantiate a $
variable for a more familiar jQuery interface.
$ = Amaze.jQuery;
If you do this, you can then target web objects like you would a jQuery object, like...
$(Object).find('something')...
...instead of...
Amaze.jQuery(Object).find('something')...
It's not much, but it's something :-)
Tests should be written asynchronously due to Selenium's asynchronous nature. We should return something or use an expectation/assertion which returns a promise. An example test has been included for reference. We have also created further documentation on writing tests to help you write good tests.
Run tests with:
node node_modules/@dequelabs/amaze-tdd
You may pass in additional flags, such as sanity-check
to include the demo test. This may help with sanity checks if you're getting a bunch of test failures:
node node_modules/@dequelabs/amaze-tdd sanity-check
Additionally, you may use PhantomJS to headlessly test the interfaces. No browser plugin is required and no browsers will spawn, which may speed up tests. Add the headless
option:
node node_modules/@dequelabs/amaze-tdd headless
Our process will run Mocha on any files in the specified path with the format *-spec.js
. This means that the following examples will work:
test-spec.js
overlay-name-spec.js
camelCase-spec.js
ALLCAPS-spec.js
some-folder/test-spec.js
some-folder/nested-folder/test-spec.js
Basically any file that ends with -spec.js
will be covered in testing.
Along with the standard compiled .js
file, you may also deliver the specs
folder. When you run your tests, they're copied into this folder for easy delivery. The only thing your customer will need to do is install this NPM suite.
We want you! To help us make this great. See our wiki on contributing for more information.
dev
option; changed prod
to phantomjs
for PhantomJS testssanity-check
option is present.amazerc
file rather than the one included in this packagebin
for the commandscript
so we need only a single install of the files.amazerc
configuration file for individual project settingsphantomjs
optionFAQs
A tool for writing functional front-end tests for Amaze™ overlays.
We found that @dequelabs/amaze-tdd demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.