Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
just-test
is a browser oriented tests runner strongly oriented to a TDD of a client side libraries, frameworks and components.
Why would we have another one?
just-test
is strongly oriented to dev real time process. It has actually began as a code running playground during my next framework development and from there evolved to be a tests runner.
The main point is to provide a shortest path for a developer to execute newly written code in the browser, re-run it while benefitting from the browser's debug tools, fix the source and re-test the whole again just in a click of refresh.
just-test
became to myself a truly TDD enabler as I'm using it in over a few dozens of libraries as of now. While being perfect tool for a librarires/components development, I'm still looking to see is and how could it be used to test a full web application.
Attention: the doc below is still in construction, more updates and detailed one will be published very soon!!! Meanwhile, the best way to actually see how the library should be used is it look onto its own tests in
tests
folder, and for CI/CD case -travis.yml
is a good start.
test.js
for examplejust-test
APIs and get the suite object by the getSuite
APItest
APIhtml
file, test.html
for exampletest.js
into it and open it in browserCongratulations! Your test/s are running.
You see the results organized in suites in the just-test
UI.
You may re-run any test from the UI, see the errors if any, status, duration etc.
just-test
is not only a convenient work frame to develop and test the code at once, but also a CI automation ready tool.
Provided additional configuration file (full example may be seen here) just-test
is able to:
puppeteer
platform will handle the download of the Edge's executablexUnit
lcov
Typical usage of the JustTest would involve two steps:
(A) referring to the framework and the tests in your html page;
(B) writing the actual test logic using an API (look example below and APIs).
index.html
<body>
...
<script src="just-test.js"></script>
<script src="test1.js"></script>
<script src="test2.js"></script>
</body>
test1.js
(function() {
'use strict';
var JT = window.Utils.JustTest, suite;
suite = JT.createSuite({ name: 'Suite object APIs' });
suite.addTest({ // options list described in API section below
name: 'JustTest namespace created okay'
}, function (pass, fail) {
if ('your internal validation logic fails') fail(new Error('error notice'));
if ('another fail') throw new Error('calling "fail" and throwing have the same effect');
pass();
});
suite.run();
})();
test2.js
(function() {
'use strict';
var JT = window.Utils.JustTest, suite;
suite = JT.createSuite();
suite.addTest(function (pass, fail) { // can skip the config, defaults will be used
...
});
suite.run();
})();
Framework object (default window.Utils.JustTest
):
Test (JustTest.Test
):
Suite (JustTest.Suite
):
FAQs
JavaScript tests runner
We found that just-test 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
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.