Skip to content

Commit 8c1954a

Browse files
committed
Fix skip + limit
1 parent b047418 commit 8c1954a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/usdk/test/basic.test.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ test('createRoot', async () => {
4343
return j;
4444
})();
4545

46-
let i = 0;
47-
const numPlugins = Infinity;
48-
for (const [name, ref] of Object.entries(indexJson)) {
46+
const skip = 0;
47+
const limit = 1;
48+
for (const [name, ref] of Object.entries(indexJson).slice(skip, skip + limit)) {
4949
// create the agent directory
5050
const agentBaseName = name
5151
.replace(/[^a-z0-9]+/gi, '-')
@@ -105,13 +105,15 @@ test('createRoot', async () => {
105105
enivronment: 'development',
106106
codecs,
107107
};
108+
109+
// render the agent
108110
const root = createRoot(state);
111+
// const { agents } = await root.render(<Agent />);
109112
const { agents } = await root.render(<Agent />);
110113
console.log('agents', agents);
111114

112-
if (++i >= numPlugins) {
113-
break;
114-
}
115+
// unmount the agent
116+
await root.unmount();
115117
}
116118

117119
// remove the agents directory

0 commit comments

Comments
 (0)