Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@web/test-runner-core
Advanced tools
@web/test-runner-core is a core library for the Web Test Runner, a modern test runner for web applications. It provides essential functionalities for running tests in browsers, including configuration, plugins, and test execution.
Configuration
This feature allows you to configure the test runner with specific settings such as the test files to include and the browsers to run the tests in.
const { startTestRunner } = require('@web/test-runner-core');
startTestRunner({
config: {
files: ['test/**/*.test.js'],
browsers: ['chrome', 'firefox'],
},
});
Plugins
This feature allows you to extend the functionality of the test runner by adding plugins. Plugins can be used to customize the behavior of the test runner.
const { startTestRunner } = require('@web/test-runner-core');
const myPlugin = require('./my-plugin');
startTestRunner({
config: {
plugins: [myPlugin()],
},
});
Test Execution
This feature allows you to execute tests and handle the results. You can specify the test files to run and process the results after the tests are completed.
const { startTestRunner } = require('@web/test-runner-core');
startTestRunner({
config: {
files: ['test/**/*.test.js'],
},
}).then((result) => {
console.log('All tests completed:', result);
});
Jest is a delightful JavaScript Testing Framework with a focus on simplicity. It works out of the box for most JavaScript projects and provides a rich API for writing and running tests. Compared to @web/test-runner-core, Jest is more opinionated and comes with built-in features like mocking and snapshot testing.
Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple. Mocha tests run serially, allowing for flexible and accurate reporting. Compared to @web/test-runner-core, Mocha is more flexible and can be integrated with various assertion libraries and reporters.
Karma is a test runner for JavaScript that runs on Node.js. It allows you to execute tests in real browsers and real devices. Karma is highly configurable and can be integrated with various testing frameworks. Compared to @web/test-runner-core, Karma is more focused on running tests in multiple browsers and environments.
Core package for Web Test Runner. Manages running the tests. Has a modular architecture, delegating most of the work to the separate parts and implementations. You will likely not use this package directly.
See our website for full documentation.
FAQs
Web test runner core
The npm package @web/test-runner-core receives a total of 0 weekly downloads. As such, @web/test-runner-core popularity was classified as not popular.
We found that @web/test-runner-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.