All files / blong-int-adapter index.ts

0% Statements 0/19
0% Branches 0/1
0% Functions 0/1
0% Lines 0/19

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                                       
import server from './server.ts';

type Load = (...params: unknown[]) => Promise<{
    start: () => Promise<unknown>;
    test: () => Promise<unknown>;
    stop: () => Promise<unknown>;
}>;

/**
 * Test runner for blong-int-adapter suite.
 * Uses internal API testing (server-only).
 * The adapter to test is selected via BLONG_ENV (e.g. adapter.mysql).
 */
export default async (load: Load): Promise<void> => {
    const platform = await load(server, 'int-adapter', 'int-adapter', ['integration']);
    await platform.start();
    await platform.test();
    if (process.env.CI) await platform.stop();
};