Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arshad-yaseen committed Sep 17, 2024
1 parent c84d0d8 commit 0f28e9b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tests/ui/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,19 @@ export default function Home() {
useEffect(() => {
if (!monaco || !editor) return;

const copilots: CopilotRegistration[] = [];
for (let i = 0; i < 10; i++) {
const copilot = registerCopilot(monaco, editor, {
endpoint: '/api/copilot',
language: 'javascript',
});
copilots.push(copilot);
}
const copilot = registerCopilot(monaco, editor, {
endpoint: '/api/copilot',
language: 'python',
});

return () => {
copilots.forEach(copilot => copilot.deregister());
copilot.deregister();
};
}, [monaco, editor]);

return (
<Editor
language="javascript"
language="python"
onMount={(editor, monaco) => {
setMonaco(monaco);
setEditor(editor);
Expand Down

0 comments on commit 0f28e9b

Please sign in to comment.