feat: ability to debug the state of fractional indices (#8235)

This commit is contained in:
Marcel Mraz 2024-07-30 10:03:27 +02:00 committed by GitHub
parent 7b36de0476
commit d0a380758e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 122 additions and 10 deletions

View file

@ -763,7 +763,10 @@ function test(
// ensure the input is invalid (unless the flag is on)
if (!expectValidInput) {
expect(() =>
validateFractionalIndices(elements.map((x) => x.index)),
validateFractionalIndices(elements, {
shouldThrow: true,
includeBoundTextValidation: true,
}),
).toThrowError(InvalidFractionalIndexError);
}
@ -777,7 +780,10 @@ function test(
expect(syncedElements.length).toBe(elements.length);
expect(() =>
validateFractionalIndices(syncedElements.map((x) => x.index)),
validateFractionalIndices(syncedElements, {
shouldThrow: true,
includeBoundTextValidation: true,
}),
).not.toThrowError(InvalidFractionalIndexError);
syncedElements.forEach((synced, index) => {