Reference tile for Themis, a Node.js and TypeScript unit test framework designed for AI coding agents. Covers unit-test authoring, Jest/Vitest migration, agent-readable failure output with repair hints, and first-class integrations for Claude Code, Cursor, and generic agents.
96
94%
Does it follow best practices?
Impact
97%
2.69xAverage score across 10 eval scenarios
Passed
No known issues
Your company maintains a React component library called ui-kit written in TypeScript. The library includes components that import CSS modules, SVG icons, and PNG images as part of their implementation. The project recently switched to Themis for unit testing.
A new engineer joined the team and wants to add tests for two components: a Button component that imports a CSS module for styles, and an Icon component that imports an SVG file and a PNG fallback. The engineer is concerned about how to handle the non-JS imports during testing and has started sketching out a configuration approach.
Your task is to write tests for these two components and set up whatever is needed to make the import situation work correctly for a Themis project.
Button and Icon components. Place them in a location appropriate for a Themis project.APPROACH.md file explaining how you handled the CSS, SVG, and PNG imports in your testing setup — specifically what files you created (or chose NOT to create) and why.You do not need to run the tests. The source files are provided below as inputs.
The following files are provided as inputs. Extract them before beginning.
=============== FILE: src/Button.tsx =============== import styles from './Button.module.css';
interface ButtonProps { label: string; onClick: () => void; disabled?: boolean; }
export function Button({ label, onClick, disabled = false }: ButtonProps) { return ( <button className={styles.button} onClick={onClick} disabled={disabled} > {label} </button> ); }
=============== FILE: src/Icon.tsx =============== import iconSvg from './assets/icon.svg'; import fallbackPng from './assets/fallback.png';
interface IconProps { size?: number; useFallback?: boolean; }
export function Icon({ size = 24, useFallback = false }: IconProps) { const src = useFallback ? fallbackPng : iconSvg; return <img src={src} width={size} height={size} alt="icon" />; }
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
rules
skills
themis