Files
Q-A_test/apps/e2e/global.teardown.ts
SDI 12e4f17b62
CI / typecheck (push) Successful in 1m8s
CI / format (push) Failing after 1m6s
CI / lint (push) Failing after 49s
CI / test (push) Failing after 1m8s
first commit
2026-07-15 18:05:12 +09:00

25 lines
618 B
TypeScript

import { test as teardown } from '@playwright/test';
import { cleanupDatabaseAfterTest } from './utils/database-utils';
import { cleanupOpenSearchAfterTest } from './utils/opensearch-utils';
teardown('teardown', async () => {
try {
try {
await cleanupDatabaseAfterTest();
} catch (error) {
console.warn('Database cleanup failed:', error);
}
try {
await cleanupOpenSearchAfterTest();
} catch (error) {
console.warn('OpenSearch cleanup failed:', error);
}
console.log('Tearing down succeeds.');
} catch (e) {
console.log('Tearing down fails.', e);
}
});