Skip to content

Commit 64b56f3

Browse files
stainless-emRobertCraigie
authored andcommitted
chore(internal): add Bun.File ecosystem test
1 parent 007c138 commit 64b56f3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ecosystem-tests/bun/openai.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ test('handles fs.ReadStream', async function () {
131131
expectSimilar(result.text, correctAnswer, 12);
132132
});
133133

134+
test('handles Bun.File', async function () {
135+
const result = await client.audio.transcriptions.create({
136+
file: Bun.file('sample1.mp3'),
137+
model,
138+
});
139+
expectSimilar(result.text, correctAnswer, 12);
140+
});
141+
134142
const fineTune = `{"prompt": "<prompt text>", "completion": "<ideal generated text>"}`;
135143

136144
// @ts-ignore avoid DOM lib for testing purposes

0 commit comments

Comments
 (0)