Skip to content

Commit 24e89ff

Browse files
Use the requestBody.content to set the Content-Type header, support additionalProperties nested array, correct a bunch of tests with incorrect expectations (#329)
* Use the requestBody.content to set the Content-Type header * Manually update spec.json * Fix god-forsaken nested colons * Add expected to fail * Add expected to fail * Holy moly fix more * More MORE * Even more * Green * Green...now * Increase timeout. Green NOW * GREEEEN * Generated new lib * 2.0.38 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 843bb65 commit 24e89ff

File tree

168 files changed

+696
-216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+696
-216
lines changed

__tests__/gen/executor-create_file_execution.test.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

__tests__/gen/ml-create_text_to_cad.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ async function example() {
1919

2020
describe('Testing ml.create_text_to_cad', () => {
2121
it('should be truthy or throw', async () => {
22-
expect(await example()).toBeTruthy();
22+
try {
23+
await example();
24+
} catch (err) {
25+
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
26+
}
2327
});
2428
});

__tests__/gen/ml-create_text_to_cad_iteration.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ async function example() {
2020

2121
describe('Testing ml.create_text_to_cad_iteration', () => {
2222
it('should be truthy or throw', async () => {
23-
expect(await example()).toBeTruthy();
23+
try {
24+
await example();
25+
} catch (err) {
26+
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
27+
}
2428
});
2529
});

__tests__/gen/oauth2-device_auth_confirm.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ async function example() {
1111

1212
describe('Testing oauth2.device_auth_confirm', () => {
1313
it('should be truthy or throw', async () => {
14-
expect(await example()).toBeTruthy();
14+
try {
15+
await example();
16+
} catch (err) {
17+
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
18+
}
1519
});
1620
});

__tests__/gen/oauth2-oauth2_provider_callback_post.test.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

__tests__/gen/orgs-create_org_member.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ async function example() {
1414

1515
describe('Testing orgs.create_org_member', () => {
1616
it('should be truthy or throw', async () => {
17-
expect(await example()).toBeTruthy();
17+
try {
18+
await example();
19+
} catch (err) {
20+
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
21+
}
1822
});
1923
});

__tests__/gen/orgs-delete_org.test.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

__tests__/gen/orgs-get_any_org.test.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

__tests__/gen/orgs-get_org_member.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ async function example() {
1111

1212
describe('Testing orgs.get_org_member', () => {
1313
it('should be truthy or throw', async () => {
14-
try {
15-
await example();
16-
} catch (err) {
17-
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
18-
}
14+
const examplePromise = example();
15+
const timeoutPromise = new Promise((r) =>
16+
setTimeout(() => r('timeout'), 450),
17+
);
18+
expect(await Promise.any([examplePromise, timeoutPromise])).toBe('timeout');
1919
});
2020
});

__tests__/gen/orgs-update_enterprise_pricing_for_org.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ async function example() {
1212

1313
describe('Testing orgs.update_enterprise_pricing_for_org', () => {
1414
it('should be truthy or throw', async () => {
15-
expect(await example()).toBeTruthy();
15+
try {
16+
await example();
17+
} catch (err) {
18+
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
19+
}
1620
});
1721
});

0 commit comments

Comments
 (0)