LibreChat/e2e/setup/global-teardown.ts
Danny Avila 6358383001
feat(db & e2e): Enhance DB Schemas/Controllers and Improve E2E Tests (#966)
* feat: add global teardown to remove test data and add registration/log-out to auth flow

* refactor(models/Conversation): index user field and add JSDoc to deleteConvos

* refactor: add user index to message schema and ensure user is saved to each Message

* refactor: add user to each saveMessage call

* fix: handle case where title is null in zod schema

* feat(e2e): ensure messages are deleted on cleanUp

* fix: set last convo for all endpoints on conversation update

* fix: enable registration for CI env
2023-09-18 15:19:50 -04:00

16 lines
330 B
TypeScript

import cleanupUser from './cleanupUser';
async function globalTeardown() {
const user = {
email: String(process.env.E2E_USER_EMAIL),
password: String(process.env.E2E_USER_PASSWORD),
};
try {
await cleanupUser(user);
} catch (error) {
console.error('Error:', error);
}
}
export default globalTeardown;