FakeJsEnvironment class

Web-only fake JS environment; on non-web platforms every method throws UnsupportedError with guidance.

On the web (under dart test -p chrome) this installs capability overrides plus a fake SharedArrayBuffer allocator so the real web code paths run without cross-origin isolation.

Constructors

FakeJsEnvironment({bool crossOriginIsolated = false, bool sharedArrayBuffer = false, bool wasmGc = false})
Describes the environment to simulate.

Properties

crossOriginIsolated bool
Simulated crossOriginIsolated value.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sharedArrayBuffer bool
Whether SharedBuffer allocation should work.
final
wasmGc bool
Simulated WasmGC support.
final

Methods

install() → void
Web-only; throws UnsupportedError here.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
uninstall() → void
Web-only; throws UnsupportedError here.

Operators

operator ==(Object other) bool
The equality operator.
inherited