Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
cwhsu1984 committed Jan 10, 2025
1 parent ce3f92d commit a753e2b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
3 changes: 0 additions & 3 deletions doughnut_mobile/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@
// fallback to plaint <script> tag.
setTimeout(() => {
if (!scriptLoaded) {
console.warn(
'Failed to load app from service worker. Falling back to plain <script> tag.',
);
loadMainDartJs();
}
}, 4000);
Expand Down
9 changes: 2 additions & 7 deletions frontend/src/generated/backend/core/CancelablePromise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,8 @@ export class CancelablePromise<T> implements Promise<T> {
}
this.#isCancelled = true;
if (this.#cancelHandlers.length) {
try {
for (const cancelHandler of this.#cancelHandlers) {
cancelHandler();
}
} catch (error) {
console.warn('Cancellation threw an error', error);
return;
for (const cancelHandler of this.#cancelHandlers) {
cancelHandler();
}
}
this.#cancelHandlers.length = 0;
Expand Down
3 changes: 0 additions & 3 deletions frontend/tests/setupVitest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ const fetchMock = createFetchMock(vi, {
fetchMock.enableMocks();

if(process.env.FRONTEND_UT_CONSOLE_OUTPUT_AS_FAILURE) {

// Throw errors when a `console.error` or `console.warn` happens
// by overriding the functions
const CONSOLE_FAIL_TYPES = ["error", "warn", "log"];

CONSOLE_FAIL_TYPES.forEach((type) => {
Expand Down

0 comments on commit a753e2b

Please sign in to comment.