Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@types/jest-axe
Advanced tools
TypeScript definitions for jest-axe
npm install --save @types/jest-axe
This package contains type definitions for jest-axe (https://github.com/nickcolley/jest-axe).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-axe.
/// <reference types="jest" />
import { AxeResults, ImpactValue, Result, RunOptions, Spec } from "axe-core";
export interface JestAxeConfigureOptions extends RunOptions {
globalOptions?: Spec | undefined;
impactLevels?: ImpactValue[];
}
/**
* Version of the aXe verifier with defaults set.
*
* @remarks You can still pass additional options to this new instance;
* they will be merged with the defaults.
*/
export const axe: JestAxe;
/**
* Runs aXe on HTML.
*
* @param html Raw HTML string to verify with aXe.
* @param options Options to run aXe.
* @returns Promise for the results of running aXe.
*/
export type JestAxe = (html: Element | string, options?: RunOptions) => Promise<AxeResults>;
/**
* Creates a new aXe verifier function.
*
* @param options Options to run aXe.
* @returns New aXe verifier function.
*/
export function configureAxe(options?: JestAxeConfigureOptions): JestAxe;
/**
* Results from asserting whether aXe verification passed.
*/
export interface AssertionsResult {
/**
* Actual checked aXe verification results.
*/
actual: Result[];
/**
* @returns Message from the Jest assertion.
*/
message(): string;
/**
* Whether the assertion passed.
*/
pass: boolean;
}
/**
* Asserts an aXe-verified result has no violations.
*
* @param results aXe verification result, if not running via expect().
* @returns Jest expectations for the aXe result.
*/
export type IToHaveNoViolations = (results?: Partial<AxeResults>) => AssertionsResult;
export const toHaveNoViolations: {
toHaveNoViolations: IToHaveNoViolations;
};
declare global {
namespace jest {
interface Matchers<R, T> {
toHaveNoViolations(): R;
}
}
// axe-core depends on a global Node
interface Node {}
}
declare module "@jest/expect" {
interface Matchers<R extends void | Promise<void>> {
toHaveNoViolations(): R;
}
}
These definitions were written by erbridge.
FAQs
TypeScript definitions for jest-axe
The npm package @types/jest-axe receives a total of 433,136 weekly downloads. As such, @types/jest-axe popularity was classified as popular.
We found that @types/jest-axe 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.