Skip to content

shuffle<T>

Shuffles the array in place. Obsidian shuffles randomly; the mock reverses the array instead, so tests stay deterministic.

Import:

import 'obsidian-test-mocks/setup';

Signature:

function shuffle(this: T[]): T[]

Parameters:

Parameter Type Description
this T[]

Returns: T[] — The same array, now reordered.