Ultimate

X_TEST_ISLAND_STATES_NOT_PURE

Means

an island states file imports the component, a renderer or a sibling module

Typical cause

a *.island.states.ts is PURE DATA: the command that takes the pictures must know the complete expected list BEFORE a browser exists, and the harness page and the guard test read the same file. Refused: solid-js, a .tsx/.jsx specifier, any relative runtime specifier (./settings.island resolves to ./settings.island.tsx under Bun, and ./helpers reaches the component one hop further on — a check reading one file's text can follow neither), and a computed specifier, which nothing can read and so nothing may call pure. Allowed: a bare specifier, a relative .json, and import type / export type, which verbatimModuleSyntax erases — an inline import { type X } is NOT erased and is refused. Static, because a module importing Solid still evaluates fine under Bun

Fix

write the import as import type { … } from '<the specifier the cause names>' if only its types are needed, otherwise delete it and inline what it exports as JSON; a computed specifier must be written as a string literal

Listed under Testing

This page as markdown