Skip to content

Commit

Permalink
chore(ecosystem-tests): fix flaky tests and remove fine tuning calls (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Jan 12, 2024
1 parent 258d79f commit 58e5fd8
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 49 deletions.
8 changes: 4 additions & 4 deletions ecosystem-tests/bun/openai.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ if (typeof Blob !== 'undefined') {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
}
test('toFile handles Uint8Array', async function () {
Expand All @@ -142,7 +142,7 @@ test('toFile handles Uint8Array', async function () {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
test('toFile handles ArrayBuffer', async function () {
const result = await client.files.create({
Expand All @@ -153,7 +153,7 @@ test('toFile handles ArrayBuffer', async function () {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
test('toFile handles DataView', async function () {
const result = await client.files.create({
Expand All @@ -164,5 +164,5 @@ test('toFile handles DataView', async function () {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
10 changes: 5 additions & 5 deletions ecosystem-tests/node-ts-cjs-auto/tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
// @ts-ignore avoid DOM lib for testing purposes
if (typeof Blob !== 'undefined') {
Expand All @@ -220,7 +220,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
}
it('handles Uint8Array', async function () {
Expand All @@ -232,7 +232,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles ArrayBuffer', async function () {
const result = await client.files.create({
Expand All @@ -243,7 +243,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles DataView', async function () {
const result = await client.files.create({
Expand All @@ -254,6 +254,6 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
});
8 changes: 4 additions & 4 deletions ecosystem-tests/node-ts-cjs-web/tests/test-jsdom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,27 +140,27 @@ describe.skip('toFile', () => {
file: await toFile(new Blob([new TextEncoder().encode(fineTune)]), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles Uint8Array', async function () {
const result = await client.files.create({
file: await toFile(new TextEncoder().encode(fineTune), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles ArrayBuffer', async function () {
const result = await client.files.create({
file: await toFile(new TextEncoder().encode(fineTune).buffer, 'finetune.jsonl'),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles DataView', async function () {
const result = await client.files.create({
file: await toFile(new DataView(new TextEncoder().encode(fineTune).buffer), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
});
8 changes: 4 additions & 4 deletions ecosystem-tests/node-ts-cjs-web/tests/test-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,28 +126,28 @@ describe('toFile', () => {
file: await toFile(new Blob([new TextEncoder().encode(fineTune)]), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
}
it('handles Uint8Array', async function () {
const result = await client.files.create({
file: await toFile(new TextEncoder().encode(fineTune), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles ArrayBuffer', async function () {
const result = await client.files.create({
file: await toFile(new TextEncoder().encode(fineTune).buffer, 'finetune.jsonl'),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles DataView', async function () {
const result = await client.files.create({
file: await toFile(new DataView(new TextEncoder().encode(fineTune).buffer), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
});
8 changes: 4 additions & 4 deletions ecosystem-tests/node-ts-cjs/tests/test-jsdom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe.skip('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles Uint8Array', async function () {
const result = await client.files.create({
Expand All @@ -119,7 +119,7 @@ describe.skip('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles ArrayBuffer', async function () {
const result = await client.files.create({
Expand All @@ -130,7 +130,7 @@ describe.skip('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles DataView', async function () {
const result = await client.files.create({
Expand All @@ -141,6 +141,6 @@ describe.skip('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
});
10 changes: 5 additions & 5 deletions ecosystem-tests/node-ts-cjs/tests/test-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
// @ts-ignore avoid DOM lib for testing purposes
if (typeof Blob !== 'undefined') {
Expand All @@ -155,7 +155,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
}
it('handles Uint8Array', async function () {
Expand All @@ -167,7 +167,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles ArrayBuffer', async function () {
const result = await client.files.create({
Expand All @@ -178,7 +178,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles DataView', async function () {
const result = await client.files.create({
Expand All @@ -189,6 +189,6 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
});
10 changes: 5 additions & 5 deletions ecosystem-tests/node-ts-esm-auto/tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
// @ts-ignore avoid DOM lib for testing purposes
if (typeof Blob !== 'undefined') {
Expand All @@ -157,7 +157,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
}
it('handles Uint8Array', async function () {
Expand All @@ -169,7 +169,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles ArrayBuffer', async function () {
const result = await client.files.create({
Expand All @@ -180,7 +180,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles DataView', async function () {
const result = await client.files.create({
Expand All @@ -191,6 +191,6 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
});
8 changes: 4 additions & 4 deletions ecosystem-tests/node-ts-esm-web/tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,28 +127,28 @@ describe('toFile', () => {
file: await toFile(new Blob([new TextEncoder().encode(fineTune)]), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
}
it('handles Uint8Array', async function () {
const result = await client.files.create({
file: await toFile(new TextEncoder().encode(fineTune), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles ArrayBuffer', async function () {
const result = await client.files.create({
file: await toFile(new TextEncoder().encode(fineTune).buffer, 'finetune.jsonl'),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles DataView', async function () {
const result = await client.files.create({
file: await toFile(new DataView(new TextEncoder().encode(fineTune).buffer), 'finetune.jsonl'),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
});
10 changes: 5 additions & 5 deletions ecosystem-tests/node-ts-esm/tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
// @ts-ignore avoid DOM lib for testing purposes
if (typeof Blob !== 'undefined') {
Expand All @@ -136,7 +136,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
}
it('handles Uint8Array', async function () {
Expand All @@ -148,7 +148,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles ArrayBuffer', async function () {
const result = await client.files.create({
Expand All @@ -159,7 +159,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles DataView', async function () {
const result = await client.files.create({
Expand All @@ -170,6 +170,6 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
});
10 changes: 5 additions & 5 deletions ecosystem-tests/node-ts4.5-jest27/tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
// @ts-ignore avoid DOM lib for testing purposes
if (typeof Blob !== 'undefined') {
Expand All @@ -155,7 +155,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
}
it('handles Uint8Array', async function () {
Expand All @@ -167,7 +167,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles ArrayBuffer', async function () {
const result = await client.files.create({
Expand All @@ -178,7 +178,7 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
it('handles DataView', async function () {
const result = await client.files.create({
Expand All @@ -189,6 +189,6 @@ describe('toFile', () => {
),
purpose: 'fine-tune',
});
expect(result.filename).toEqual('finetunes.jsonl');
expect(result.filename).toEqual('finetune.jsonl');
});
});
Loading

0 comments on commit 58e5fd8

Please sign in to comment.