prototypey.org - atproto lexicon typescript toolkit - mirror https://github.com/tylersayshi/prototypey
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix race condition in playground test

Tyler fec372a4 27c1fecd

+8 -7
+8 -7
packages/site/tests/components/Playground.test.tsx
··· 86 86 it("starts with default code in editor", async () => { 87 87 renderPlayground(); 88 88 89 - // Wait for editors to be ready 90 89 await waitFor(() => { 91 - expect(screen.getAllByTestId("monaco-editor").length).toBeGreaterThan(0); 90 + const inputEditor = screen 91 + .getAllByTestId("monaco-editor") 92 + .find((e) => 93 + (e as HTMLTextAreaElement).value?.includes( 94 + 'lx.lexicon("app.bsky.actor.profile"', 95 + ), 96 + ); 97 + expect(inputEditor).toBeDefined(); 92 98 }); 93 - 94 - const editors = screen.getAllByTestId("monaco-editor"); 95 - const inputEditor = editors[0] as HTMLTextAreaElement; 96 - 97 - expect(inputEditor.value).toContain('lx.lexicon("app.bsky.actor.profile"'); 98 99 }); 99 100 100 101 it("evaluates code and displays output", async () => {