Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@ephox/bedrock
Advanced tools
bedrock
is a test runner for JavaScript projects. Its primary use is to test Javascript projects, but it also has a qunit
wrapper. It can run manually (where the user navigates to the browser themselves), or automatically (where bedrock
starts the browser and runs the tests automatically). Note, in order to run the tests automatically, the appropriate web-drivers need to be installed and available. For more information on setting up web-drivers, see here.
bedrock
is available as an npm
package. You can install it via the npm package @ephox/bedrock
or from source
A global install will put the bedrock commands (e.g. bedrock-auto
) automatically on your path.
$ npm install -g @ephox/bedrock
$ npm install -g .
A local install will not put the bedrock commands automatically on your path. After installing locally, you can access the commands via:
node_modules/.bin
to your pathnpm run ${command}
from the bedrock source directorynpm install @ephox/bedrock
.
$ npm install .
bedrock
has three main modes: test, server, and framework. These are available through three commands: bedrock-auto
, bedrock
, and bedrock-framework
.
Test mode allows the user to run tests in an automated fashion. Bedrock will spin up the browser itself (assuming the user has the right web-drivers on the path), establish a web-driver connection with this browser and close the browser once the tests have completed. Information on installing web-drivers can be found here.
BROWSER: chrome | firefox | safari | MicrosoftEdge | ie | phantomjs
e.g. run automated bedrock tests in chrome against test directory src/test/js/browser
bedrock-auto --browser chrome --testdir src/test/js/browser
Use bedrock-auto --help
to see all arguments possible.
Server mode allows the user to host the tests on localhost:{port} where port is the first free port found between 8000 and 20000. It is the most commonly used mode, and therefore is the default bedrock executable.
bedrock --files src/test/js/browser/TwoTest.ts
Use bedrock --help
to see all arguments possible.
Framework mode allows bedrock to run using an existing framework. The only currently supported testing framework is qunit
. Bedrock assumes that a single page is responsible for running all the tests, so a page
and browser
are the only things required. Another parameter framework
is also possible, but its only possible value currently is qunit
.
e.g. Run existing tests on a qunit page using phantom
bedrock-framework --page tests/index.html --browser phantomjs
Use bedrock-framework --help
to see all arguments possible.
You can run bedrock's tests by executing:
$ npm run test
This will not run test-samples-fail
which will need to be run and verified manually. (All should fail)
If you just want to run the basic tests (not property-based), use $ npm run test-atomic
. If you want to run only the property-based tests, use $ npm run test-props
. If you want to run the sample tests use $ npm run test-samples-pass
and $ npm run test-samples-fail
.
The dockerfile
is just to test the no-sandbox option for chrome-headless. We should build automated tests for it.
FAQs
NodeJS test runner
The npm package @ephox/bedrock receives a total of 96 weekly downloads. As such, @ephox/bedrock popularity was classified as not popular.
We found that @ephox/bedrock 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.