Skip to content

Commit 276c52d

Browse files
committed
fix: tests, scriptsRunner
1 parent 9affd61 commit 276c52d

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

scriptsRunner.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const execute = (scriptName) =>
3636
});
3737

3838
const run = async () => {
39-
for (const command of commands) {
40-
for (const scriptName of packageScripts) {
39+
for await (const command of commands) {
40+
for await (const scriptName of packageScripts) {
4141
try {
4242
if (scriptName === command) {
4343
await execute(scriptName);

tests/helpers/assertGeneratedModule.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ const assertGeneratedModule = (pathToModule1, pathToModule2) => {
1717

1818
if (diff && diff.length) {
1919
console.log("\n" + diff);
20-
throw new Error("expected another output");
20+
console.error(new Error("expected another output").stack);
21+
process.exit(1);
2122
}
2223
}
2324

tests/helpers/validateGeneratedModule.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ module.exports = (pathToFile) => {
6565

6666
if (diagnostics.length) {
6767
console.error(diagnostics);
68-
throw new Error("Failed");
68+
console.error(new Error("Failed").stack);
69+
process.exit(1);
6970
}
7071

7172
return diagnostics;

tests/spec/axios/expected.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ export class HttpClient<SecurityDataType = unknown> {
19861986
protected createFormData(input: Record<string, unknown>): FormData {
19871987
return Object.keys(input || {}).reduce((formData, key) => {
19881988
const property = input[key];
1989-
const propertyContent: Iterable<any> = property instanceof Array ? property : [property];
1989+
const propertyContent: any[] = property instanceof Array ? property : [property];
19901990

19911991
for (const formItem of propertyContent) {
19921992
const isFileType = formItem instanceof Blob || formItem instanceof File;

tests/spec/axiosSingleHttpClient/expected.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ export class HttpClient<SecurityDataType = unknown> {
19861986
protected createFormData(input: Record<string, unknown>): FormData {
19871987
return Object.keys(input || {}).reduce((formData, key) => {
19881988
const property = input[key];
1989-
const propertyContent: Iterable<any> = property instanceof Array ? property : [property];
1989+
const propertyContent: any[] = property instanceof Array ? property : [property];
19901990

19911991
for (const formItem of propertyContent) {
19921992
const isFileType = formItem instanceof Blob || formItem instanceof File;

0 commit comments

Comments
 (0)