MCPcopy
hub / github.com/tinymce/tinymce / check

Function check

modules/polaris/src/test/ts/atomic/api/ParrayFindTest.ts:9–17  ·  view source on GitHub ↗
(expected: Optional<string>, input: string[], value: string | null)

Source from the content-addressed store, hash-verified

7
8UnitTest.test('api.PositionArray.find', () => {
9 const check = (expected: Optional<string>, input: string[], value: string | null) => {
10 const pred = (unit: Parrays.PArrayTestItem) => {
11 return unit.item === value;
12 };
13
14 const parray = Parrays.make(input);
15 const actual = PositionArray.find(parray, pred);
16 KAssert.eqOptional('eq', expected, actual.map((x) => x.item));
17 };
18
19 check(Optional.none(), [], null);
20 check(Optional.some('a'), [ 'a' ], 'a');

Callers 1

ParrayFindTest.tsFile · 0.70

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…