Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
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 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('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/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/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/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 overlays.
The npm package amaze-tdd receives a total of 2 weekly downloads. As such, amaze-tdd popularity was classified as not popular.
We found that amaze-tdd 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
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.