
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
web-test-runner-jasmine
Advanced tools
A Web Test Runner plugin for running Jasmine.
Import jasmineTestRunnerConfig
and add too your web-test-runner.config.mjs
.
If using TypeScript you can add esbuildPlugin
.
import { playwrightLauncher } from '@web/test-runner-playwright';
import { esbuildPlugin } from '@web/dev-server-esbuild';
import { jasmineTestRunnerConfig } from 'web-test-runner-jasmine';
export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
...jasmineTestRunnerConfig(),
testFramework: {
config: {
defaultTimeoutInterval: 5000
},
},
nodeResolve: true,
files: ['./src/*.spec.js'],
browsers: [playwrightLauncher({ product: 'chromium' })],
plugins: [esbuildPlugin({ target: 'auto', sourceMap: true })]
});
Once added you can use Jasmine within your tests.
describe('a test suite', () => {
let element: HTMLElement;
beforeEach(() => {
element = document.createElement('p');
element.innerHTML = 'hello there';
});
afterEach(() => {
element.remove();
});
it('should create element', () => {
expect(element.innerHTML).toBe('hello there');
});
});
To run your tests run web-test-runner
in the terminal.
web-test-runner
If you use TypeScript you will need to add some additional configuiration. Update your
config to read .ts
extentions and add the ts: true
flag to the esBuildPlugin
.
import { playwrightLauncher } from '@web/test-runner-playwright';
import { esbuildPlugin } from '@web/dev-server-esbuild';
import { jasmineTestRunnerConfig } from 'web-test-runner-jasmine';
export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
...
files: ['./src/*.spec.ts'],
plugins: [esbuildPlugin({ ts: true, json: true, target: 'auto', sourceMap: true })]
...
});
Ensure you have the @types/jasmine
package installed and add jasmine
to the types
in your tsconfig.json
.
{
"compilerOptions": {
...
"types": ["jasmine"],
...
}
}
Learn more about Web Test Runner.
0.1.4
FAQs
Plugin for Jasmine and Web Test Runner
The npm package web-test-runner-jasmine receives a total of 3,461 weekly downloads. As such, web-test-runner-jasmine popularity was classified as popular.
We found that web-test-runner-jasmine demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.