Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@platejs/test

Latest version: v54.0.0-beta.3

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
npm package Publisher: zbeyens
16,711 Stars
999 Forks
3 Versions
240 Downloads
TypeScript Repo language

Scan summary

@platejs/test was last scanned on 23 Nov 2026 at version 54.0.0-beta.3. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions, all published within 5 days (19–23 Nov 2026).
  • Findings: No rules fired in version 54.0.0-beta.3.
  • Downloads: 240 downloads.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
54.0.0-beta.3 LATEST 23 Nov 2026 No rules fired
54.0.0-beta.2 19 Nov 2026 No rules fired
0.0.0-stage 19 Nov 2026 Not shown

No rules fired in 54.0.0-beta.3

Findings

Findings for v54.0.0-beta.3. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 54.0.0-beta.3; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@platejs/test

Plate test utilities for headless, React, DOM, Playwright, and proof work.

@platejs/test is Plate's test-only distribution. Its root is safe in plain Node. React, browser DOM, Playwright, and release-proof code live behind explicit subpaths so one test environment does not load another.

Install

npm install platejs
npm install -D @platejs/test

Install the peers for the subpath you use:

npm install -D react react-dom @testing-library/react
npm install -D @playwright/test

Use the matching command for pnpm, Yarn, or Bun when your project uses another package manager.

Import exactly the layer you need:

Runtime labels describe where the exported module executes. Node-hosted tools remain headless even when they drive a browser:

Entrypoint Runtime
@platejs/test headless
@platejs/test/proof headless
@platejs/test/playwright headless
@platejs/test/react client
@platejs/test/browser client

Package Surface

  • @platejs/test
    • Plate JSX fixtures: jsx, jsxt, and hjsx
    • fixture editor creation: createEditorFromFixture
    • selection projection: projectTestSelectionRange
    • minimal DataTransfer fixtures: createDataTransfer
  • @platejs/test/react
    • EditorTest for rendering an existing Plate editor
    • createTestEditor for Testing Library interaction tests
  • @platejs/test/proof
    • pure selection helpers: serializePoint, serializeRange, isCollapsed
    • IME and placeholder proof classifiers: evaluateImeInput, evaluatePlaceholderInput
    • raw-mobile receipt validation: assertRawMobileProof, validateRawMobileProof, RAW_MOBILE_SCENARIOS
    • first-party parity contracts: assertBrowserFirstPartyParityContracts
    • feature proof contracts: defineBrowserFeatureContract, createBrowserFeatureContractRegistry
    • debug snapshot parsers for agent-browser and Appium proof artifacts
  • @platejs/test/browser
    • DOM selection snapshots: takeDOMSelectionSnapshot, takeEditorSelectionSnapshot
    • zero-width placeholder inspection: inspectZeroWidthPlaceholder
  • @platejs/test/playwright
    • start here for browser proof work
    • test and expect: Playwright's, plus editor-state.json saved in a failed test's results folder
    • editor-first Playwright harness
    • Chromium CDP IME helpers
    • real clipboard write + browser paste helpers
    • real clipboard read helpers
    • readiness contract for mounted examples
    • getter namespace for text/html/selection state
    • selected-text getter
    • displayed-selection getter for native and projected selection proof
    • screenshot attachment helper for visual proof artifacts
    • file-backed JSON attachment helper for replayable proof artifacts
    • native event trace helpers for selectionchange, beforeinput, input, composition, target ranges, DOM deltas, and anomaly labels
    • trusted typing timing and long-task capture through measureTrustedTyping(...)
    • block-text getter and assertion helpers
    • snapshot helper for aggregated editor state
    • selection namespace for semantic selection actions and setup
    • DOM namespace for mounted text-path readiness and native caret setup
    • tolerant selection assertions
    • collapsed model/native DOM selection agreement assertions
    • double-highlight selection assertion
    • normalized html equality assertions
    • iframe and scoped-surface support
    • block/text locator helpers: getBrowserEditable, locateBrowserBlock, locateBrowserText
    • replayable scenario steps, including direct DOM text mutation import for contenteditable repair proof
    • replayable selection-contract assertions for model, native selected text, DOM endpoints, visible selection, and double-highlight proof
    • helper types: ReadyOptions, EditorSurfaceOptions, selection and clipboard snapshot types, native event trace snapshot and anomaly types
    • withExclusiveClipboardAccess(...)

Boundaries

  • @platejs/test is public test infrastructure, not the editor runtime API.
  • The root imports only platejs and platejs/hyperscript; it does not load React, browser globals, or Playwright.
  • @platejs/test/react owns React and Testing Library helpers.
  • @platejs/test/playwright owns browser tests. It may depend on Playwright types and test fixtures.
  • @platejs/test/proof and @platejs/test/browser stay small enough for pure assertions, capability classifiers, and DOM snapshots.
  • Raw-device identity belongs to the executable device runner. Automated device-browser input or IME proof closes only when that gate runs and records the resolved device, OS, and capability scope. Proxy browser evidence does not claim native mobile clipboard, human soft-keyboard, glide typing, or voice input proof.
  • The public package validates raw receipt structure and exact build identity. Repository release profiles, aggregate lane policy, artifact acquisition, and filesystem digest readback stay in release tooling.

Raw Mobile Device Proof

Run the raw gate only in a direct-Appium lane connected to a real Android device running Chrome and a real iOS device running Safari:

bun test:mobile-device-proof:raw

The runner reads test-results/release-proof/mobile-device-proof.json. The schema requires one receipt for every scenario on both platforms: tap, double tap, long press, forward and backward selection handles, cross-inline and cross-block selection, selection auto-scroll, collapsed and expanded swipes, inline-void boundaries, Enter, Backspace, autocapitalization, composition/IME, and native clipboard.

Every receipt records real device, OS, browser, the exact expected source commit, replay steps, native and semantic selection, model and DOM text, semantic update count, event trace, screenshots, video, and SHA-256 digests. The command independently reads every artifact back and verifies its digest. An incomplete matrix, stale commit, viewport emulation, agent-browser proxy, or Appium descriptor without those artifacts fails closed and proves no raw-mobile claim.

First Playwright Test

import { expect, openExample, test } from '@platejs/test/playwright';

test('types through the browser editor', async ({ page }) => {
  const editor = await openExample(page, 'plaintext', {
    ready: { editor: 'visible' },
  });

  await editor.focus();
  await editor.type('Hello from @platejs/test');

  await editor.assert.text('Hello from @platejs/test');
  await editor.assert.noDoubleSelectionHighlight();
  expect(await editor.get.selectedText()).toBe('');
});

The page under test installs the browser handle once, at module scope in a test or development entry, before its first editor mounts. Production entries never call it. Without it, ready: { editor: 'visible' } fails with "browser handle not installed".

import { installBrowserHandle } from 'platejs/react'; // or 'plitejs/react'

installBrowserHandle();

Each Playwright project names how editor.clipboard.pasteText and pasteHtml deliver a paste:

import type { BrowserTestOptions } from '@platejs/test/playwright';
import { defineConfig, devices } from '@playwright/test';

export default defineConfig<BrowserTestOptions>({
  projects: [
    {
      name: 'chromium',
      use: {
        ...devices['Desktop Chrome'],
        clipboardTransport: 'native',
        permissions: ['clipboard-read', 'clipboard-write'],
      },
    },
    {
      name: 'webkit',
      use: { ...devices['Desktop Safari'], clipboardTransport: 'event' },
    },
  ],
});

'native' writes the clipboard and presses the paste shortcut. 'event' dispatches paste, then beforeinput when nothing cancels it. 'handle' calls the editor directly and is labeled a stand-in. A paste fails when its transport did not apply it or the page threw, and each test records its transport in a clipboard-transport annotation.

Proof Style

Use the ready contract for maintained callsites and examples. For editor surfaces, do not use Playwright locator.fill() as proof. The editor owns model input through beforeinput, selection import, and editor commands; fill() can bypass or mis-model that path, especially in Firefox. Use editor.type(...) or page.keyboard.type(...) when the claim is real keyboard behavior: typing, selected-text replacement, undoable key input, focus/caret routing, Enter follow-up text, or visual caret proof. Use page.keyboard.insertText(...) only when the row deliberately bypasses keydown: native beforeinput / targetRange traces, IME or CDP input, Unicode/layout insertion that Playwright cannot key-dispatch consistently, direct browser DOM mutation import, undo grouping as one text insertion, or model-latency probes. Then assert model text, native selection, and native event trace when the behavior depends on browser input. Use measureTrustedTyping({ page, root, text }) after explicit editor readiness, selection, focus, and warmup when a route needs exact per-key DOM target/model readiness, a post-readiness paint boundary, trusted input, an unthrottled burst budget, and fail-closed long-task coverage. Pair it with an exact final model assertion for the whole measured text. Model-owned input binds to the runtime's recorded event selection; native input also requires its DOM target range to resolve to that same path and offset. Native event traces are browser contracts, not one-size-fits-all strings: Chromium/WebKit insertText may produce only beforeinput, while Firefox can report insertCompositionText and a trailing input event for the same Playwright call. Clipboard helpers prove delivery path and editor ownership, not feature semantics by themselves. editor.clipboard.pasteHtml(...) writes a rich clipboard payload and triggers the browser paste path; the route-specific test must still assert the expected parser behavior. Do not treat it as proof that a surface supports every rich HTML mark, element, sanitizer, or table policy. Use replayable scenario steps for generated stress. For direct browser DOM mutation/import proof, use mutateTextDOM so the artifact stays replayable; use editor.scenario.runImperative(...) for arbitrary browser work. Imperative scenario results are explicitly non-replayable, non-reducible, and ineligible for release proof. Generated stress artifacts carry reduction candidates. Replay the full artifact with STRESS_REPLAY=<artifact> pnpm --filter plite test:plite-browser:project <project> tests/plite-browser/donor/stress/replay.test.ts. Replay one candidate with STRESS_REPLAY=<artifact> STRESS_REDUCTION=<label> pnpm --filter plite test:plite-browser:project <project> tests/plite-browser/donor/stress/replay.test.ts. Reduced replays write a separate .reduction-<label>.result.json trace beside the full replay result. Decode imported JSON with decodeScenarioReplay(...); never cast replay values into scenario steps. The decoder rejects unknown steps, stale metadata, non-JSON payloads, and assertion shapes that cannot prove anything.

Example:

import {
  attachBrowserJsonArtifact,
  attachPageScreenshot,
  openExample,
  startBrowserNativeEventTrace,
  stopBrowserNativeEventTrace,
  takeBrowserNativeEventTrace,
} from '@platejs/test/playwright';

const editor = await openExample(page, 'placeholder', {
  ready: {
    editor: 'visible',
    placeholder: 'visible',
  },
});

await editor.focus();
await editor.type('Hello Editor Browser');
await editor.selection.select({
  anchor: { path: [0, 0], offset: 0 },
  focus: { path: [0, 0], offset: 5 },
});
await editor.dom.waitForTextPath([0, 0]);
await editor.dom.collapseAtTextPath({ path: [0, 0], offset: 5 });

await editor.assert.text('Hello Editor Browser');
await editor.assert.blockTexts(['Hello Editor Browser']);
expect(await editor.get.selectedText()).toBe('Hello');
expect((await editor.selection.displayed()).source).toBe('native');
await editor.assert.noDoubleSelectionHighlight();
await attachPageScreenshot(page, testInfo, 'selection-proof.png');

await startBrowserNativeEventTrace(editor.root);
await editor.type('!');
const nativeTrace = await takeBrowserNativeEventTrace(editor.root);
expect(nativeTrace.entries.some((entry) => entry.type === 'beforeinput')).toBe(
  true
);
await stopBrowserNativeEventTrace(editor.root);

await editor.assert.htmlContains('data-editor-string="true"');
await editor.assert.selection({
  anchor: { path: [0, 0], offset: [0, 1] },
  focus: { path: [0, 0], offset: [4, 5] },
});
await editor.assert.collapsedModelDOMSelection({
  offset: [4, 5],
  path: [0, 0],
  text: 'Hello Editor Browser',
});
await editor.assert.htmlEquals(
  '<div data-editor-node="element"><span data-editor-node="text"><span data-editor-leaf="true"><span data-editor-string="true">Hello Editor Browser</span></span></span></div>',
  { ignoreClasses: true, ignoreInlineStyles: true, ignoreDir: true }
);

const snapshot = await editor.snapshot();
expect(snapshot.selection).not.toBeNull();
await attachBrowserJsonArtifact(testInfo, 'editor-snapshot-proof', snapshot);

const secondBlock = editor.locator.block([1]);
await secondBlock.click({ clickCount: 3 });
await editor.selection.doubleClickDragTextRange({
  doubleClickOffset: 'This is edit'.length,
  endOffset: 'This is editable plain'.length,
  text: 'This is editable plain text, just like a <textarea>!',
});
await editor.selection.dragTextRange({
  endOffset: 5,
  endText: ' text, ',
  startOffset: 8,
  text: 'This is editable ',
});
await editor.selection.dragTextRange({
  direction: 'backward',
  endOffset: 'hyperlink'.length,
  startOffset: 0,
  text: 'hyperlink',
});
await editor.scenario.run([
  {
    expectation: {
      domSelection: {
        anchorNodeText: 'This is editable ',
        anchorOffset: 8,
        focusNodeText: ' text, ',
        focusOffset: 5,
      },
      noDoubleSelectionHighlight: true,
      selectedText: 'editable rich text',
    },
    kind: 'assertSelectionContract',
  },
]);

await editor.clipboard.pasteText('more');
await editor.clipboard.copy();
expect(await editor.clipboard.readText()).toContain('more');

For Tab-away or blur proof, use editor.assert.noVisibleCaretInRoot() after focus leaves the editor. It asserts the editor no longer owns a paintable focused caret even if the browser keeps a stale DOM range.

Package commands:

  • pnpm --filter @platejs/test build
  • pnpm --filter @platejs/test test
  • pnpm --filter @platejs/test test:node
  • pnpm --filter @platejs/test test:react
  • pnpm --filter @platejs/test test:proof
  • pnpm --filter @platejs/test test:dom
  • pnpm --filter @platejs/test test:selection

The package-local test script covers:

  • test:node
  • test:react
  • test:dom

Run test:selection for the focused browser-selection lane.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @platejs/test

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Frame 2085668439 (1)
Group 1261154229