SIGN IN SIGN UP
payloadcms / payload UNCLAIMED

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.

41461 0 1 TypeScript

test: fix flaky lexical code block test with incorrect error expectations (#15776)

### What

Fixed flaky e2e test for lexical code blocks that was consistently
failing in CI and locally.

<img width="1335" height="607" alt="Screenshot 2026-02-26 at 2 44 02 PM"
src="https://github.com/user-attachments/assets/bf0db1d3-c32c-4b10-bf92-b4ac1b56d5c6"
/>

### Why

The test expectations for squiggly error counts were inverted between
the regular code block test and the payload code block test.

The regular code block test expected 1 error but got 0, while the
payload code block test expected 0 errors but should expect 1.

### How

Corrected the error count expectations to match actual Monaco editor
behavior:
- Regular code block (no semantic validation): expects 0 errors
- Payload code block (with type checking): expects 1 error for invalid
imports

---------

Co-authored-by: Alessio Gravili <github@gravili.net>
P
Patrik committed
4e3e7807caab0bf50ef124a6b86441ef33859c87
Parent: 9f0c101
Committed by GitHub <noreply@github.com> on 2/27/2026, 4:53:23 PM