Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import {handler} from '@feasibleone/blong'; /** * sqlUnitDrop — drops the `sql_unit` test table from the blong-integration * database if it exists. * This handler is called from integration tests to clean up after tests. */ export default handler( () => async function sqlUnitDrop( _params: Record<string, never>, _$meta: Record<string, unknown>, ): Promise<{table: string; dropped: boolean}> { const existed = await this.config?.context?.queryBuilder?.schema.hasTable('sql_unit'); if (existed) { await this.config?.context?.queryBuilder?.schema.dropTable('sql_unit'); } return {table: 'sql_unit', dropped: existed ?? false}; }, ); |