Skip to content

Commit a0751bf

Browse files
committed
Do not double-throw error
1 parent 194044f commit a0751bf

25 files changed

+32
-32
lines changed

tests/pipelines/test_pipelines_audio_classification.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default () => {
7474
});
7575

7676
afterAll(async () => {
77-
await pipe.dispose();
77+
await pipe?.dispose();
7878
}, MAX_MODEL_DISPOSE_TIME);
7979
});
8080
};

tests/pipelines/test_pipelines_automatic_speech_recognition.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default () => {
8888
});
8989

9090
afterAll(async () => {
91-
await pipe.dispose();
91+
await pipe?.dispose();
9292
}, MAX_MODEL_DISPOSE_TIME);
9393
});
9494

@@ -122,7 +122,7 @@ export default () => {
122122
});
123123

124124
afterAll(async () => {
125-
await pipe.dispose();
125+
await pipe?.dispose();
126126
}, MAX_MODEL_DISPOSE_TIME);
127127
});
128128
});

tests/pipelines/test_pipelines_background_removal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default () => {
3535
);
3636

3737
afterAll(async () => {
38-
await pipe.dispose();
38+
await pipe?.dispose();
3939
}, MAX_MODEL_DISPOSE_TIME);
4040
});
4141

@@ -63,7 +63,7 @@ export default () => {
6363
);
6464

6565
afterAll(async () => {
66-
await pipe.dispose();
66+
await pipe?.dispose();
6767
}, MAX_MODEL_DISPOSE_TIME);
6868
});
6969
});

tests/pipelines/test_pipelines_depth_estimation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default () => {
5151
});
5252

5353
afterAll(async () => {
54-
await pipe.dispose();
54+
await pipe?.dispose();
5555
}, MAX_MODEL_DISPOSE_TIME);
5656
});
5757
};

tests/pipelines/test_pipelines_document_question_answering.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default () => {
3535
});
3636

3737
afterAll(async () => {
38-
await pipe.dispose();
38+
await pipe?.dispose();
3939
}, MAX_MODEL_DISPOSE_TIME);
4040
});
4141
};

tests/pipelines/test_pipelines_feature_extraction.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export default () => {
115115
});
116116

117117
afterAll(async () => {
118-
await pipe.dispose();
118+
await pipe?.dispose();
119119
}, MAX_MODEL_DISPOSE_TIME);
120120
});
121121
};

tests/pipelines/test_pipelines_fill_mask.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export default () => {
9595
});
9696

9797
afterAll(async () => {
98-
await pipe.dispose();
98+
await pipe?.dispose();
9999
}, MAX_MODEL_DISPOSE_TIME);
100100
});
101101

@@ -158,7 +158,7 @@ export default () => {
158158
});
159159

160160
afterAll(async () => {
161-
await pipe.dispose();
161+
await pipe?.dispose();
162162
}, MAX_MODEL_DISPOSE_TIME);
163163
});
164164
});

tests/pipelines/test_pipelines_image_classification.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default () => {
7575
});
7676

7777
afterAll(async () => {
78-
await pipe.dispose();
78+
await pipe?.dispose();
7979
}, MAX_MODEL_DISPOSE_TIME);
8080
});
8181
};

tests/pipelines/test_pipelines_image_feature_extraction.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default () => {
4646
});
4747

4848
afterAll(async () => {
49-
await pipe.dispose();
49+
await pipe?.dispose();
5050
}, MAX_MODEL_DISPOSE_TIME);
5151
});
5252
describe("CLIP-like", () => {
@@ -88,7 +88,7 @@ export default () => {
8888
});
8989

9090
afterAll(async () => {
91-
await pipe.dispose();
91+
await pipe?.dispose();
9292
}, MAX_MODEL_DISPOSE_TIME);
9393
});
9494
});

tests/pipelines/test_pipelines_image_segmentation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default () => {
6464
);
6565

6666
afterAll(async () => {
67-
await pipe.dispose();
67+
await pipe?.dispose();
6868
}, MAX_MODEL_DISPOSE_TIME);
6969
});
7070

@@ -112,7 +112,7 @@ export default () => {
112112
);
113113

114114
afterAll(async () => {
115-
await pipe.dispose();
115+
await pipe?.dispose();
116116
}, MAX_MODEL_DISPOSE_TIME);
117117
});
118118
});

0 commit comments

Comments
 (0)