Skip to content

Instantly share code, notes, and snippets.

View ryparker's full-sized avatar
🍊

Ryan Parker ryparker

🍊
View GitHub Profile
@ryparker
ryparker / jest-circus-environment-interface.ts
Last active July 28, 2020 05:10
Create custom Jest Circus environments using this interface. Template repo available here: https://github.com/ryparker/jest-circus-environment-template
import NodeEnvironment from 'jest-environment-node';
import type { Config, Circus } from '@jest/types';
import type {EnvironmentContext} from '@jest/environment';
export default class CircusEnvironment extends NodeEnvironment {
testPath?: string;
docblockPragmas?: Record<string, string | string[]>;
constructor(config: Config.ProjectConfig, context: EnvironmentContext) {
super(config);
@ryparker
ryparker / jest-reporter-interface.ts
Last active October 7, 2021 21:51
Create custom Jest reporters using this interface. Template repo available here: https://github.com/ryparker/jest-reporter-template
import {
AggregatedResult,
Config,
Context,
Reporter,
ReporterOnStartOptions,
Test,
TestResult,
} from '@jest/reporters'