Skip to content

Commit aceaac0

Browse files
committed
fix(tests/embeddings): avoid cross-realm issue
1 parent 9eb9854 commit aceaac0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/api-resources/embeddings.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('resource embeddings', () => {
4242
model: 'text-embedding-3-small',
4343
});
4444

45-
expect(response.data?.at(0)?.embedding).toBeInstanceOf(Array);
45+
expect(Array.isArray(response.data?.at(0)?.embedding)).toBe(true);
4646
expect(response.data?.at(0)?.embedding.at(0)).toBe(-0.09928705543279648);
4747
});
4848

@@ -54,7 +54,7 @@ describe('resource embeddings', () => {
5454
encoding_format: 'float',
5555
});
5656

57-
expect(response.data?.at(0)?.embedding).toBeInstanceOf(Array);
57+
expect(Array.isArray(response.data?.at(0)?.embedding)).toBe(true);
5858
expect(response.data?.at(0)?.embedding.at(0)).toBe(-0.099287055);
5959
});
6060

0 commit comments

Comments
 (0)