
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@wpkernel/test-utils
Advanced tools
Shared testing utilities for the WPKernel monorepo. Harnesses in this package keep WordPress globals, wpk runtime state, and workspace scaffolds deterministic across unit, integration, and CLI suites.
The helpers are grouped by concern so packages can compose only what they need:
window.wp globals, fixtures, and apiFetch
mocks for unit tests.__WP_KERNEL_ACTION_RUNTIME__ safely when exercising actions.WPKernelUIProvider with console guards and registry resets.pnpm add -D @wpkernel/test-utils
These helpers are published for internal use while the MVP stabilises. Import the families you need rather than deep-linking into source files so future refactors remain non-breaking.
import { createWPKernelUITestHarness } from '@wpkernel/test-utils/ui';
import { createWordPressTestHarness } from '@wpkernel/test-utils/core/wp-harness';
const wp = createWordPressTestHarness();
const { renderWithKernel } = createWPKernelUITestHarness({
createRuntime: () => wp.wpkernelRuntime,
});
it('renders job list', async () => {
const screen = renderWithKernel(<JobsList />);
await screen.findByText('Software Engineer');
});
createWordPressTestHarness – seeds deterministic stores, selectors, and hooks.withWordPressData / createApiFetchHarness – scope mutations around tests to avoid global
leakage.applyActionRuntimeOverrides / withActionRuntimeOverrides – mutate the global runtime
safely and roll back between assertions.createWPKernelUITestHarness – wraps WPKernelUIProvider with console guards, registry
resets, and helper assertions.src/ui/wpkernel-ui-harness.ts and
src/dataviews/test-support/ResourceDataView.test-support.tsx; extend them when new shared
flows are required and add accompanying self-tests.MemoryStream, createCommandContext, createReporterMock, and flushAsync – share the
canonical Clipanion wiring used by CLI suites.withWorkspace, createWorkspaceRunner, and PHP helpers under src/integration/ – create
disposable workspaces, execute PHP drivers, and compare manifests without hand-rolled file IO.Run pnpm --filter @wpkernel/test-utils test and pnpm --filter @wpkernel/test-utils typecheck:tests
after changing harnesses. Consumers should also re-run their suites to confirm shared helpers did
not regress behaviour.
Keep new helpers exported through src/index.ts and update the package guide when surfaces move
between families. Document novel patterns in tests/TEST_PATTERNS.md so downstream packages adopt
the same conventions.
EUPL-1.2 © The Geekist
FAQs
Shared testing utilities for WPKernel packages
We found that @wpkernel/test-utils 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.