Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

1.9 KB
Raw Blame
/**
 * Test Infrastructure Library
 *
 * Single import point for all test utilities:
 *
 * const { setupTest, teardownTest, TestResults, log } = require('./test_lib');
 *
 * Example usage:
 *
 *   const { setupTest, teardownTest, TestResults, log } = require('./test_lib');
 *
 *   async function runTests() {
 *       const ctx = await setupTest({ authenticate: true });
 *       const results = new TestResults('My Test Suite');
 *
 *       try {
 *           log.section('Form Tests');
 *
 *           await results.run('Forms', 'Query input exists', async () => {
 *               await ctx.page.goto(`${ctx.config.baseUrl}/`);
 *               const input = await ctx.page.$('#query');
 *               if (!input) throw new Error('Query input not found');
 *           }, { page: ctx.page });
 *
 *       } finally {
 *           results.print();
 *           results.save();
 *           await teardownTest(ctx);
 *           process.exit(results.exitCode());
 *       }
 *   }
 *
 *   runTests();
 */

const {
    config,
    viewports,
    setupTest,
    teardownTest,
    screenshot,
    delay,
    withTimeout,
    navigateTo,
    withFreshBrowserContext,
    waitFor,
    waitForVisible,
    clickAndWaitForNavigation,
    getInputValue,
    clearAndType,
    findActionButton,
    expandSettingsSectionFor,
    expandAllSettingsSections,
    log,
} = require('./test_utils');

const { TestResults, escapeXml } = require('./test_results');

module.exports = {
    // Configuration
    config,
    viewports,

    // Setup/Teardown
    setupTest,
    teardownTest,

    // Utilities
    screenshot,
    delay,
    withTimeout,
    navigateTo,
    withFreshBrowserContext,
    waitFor,
    waitForVisible,
    clickAndWaitForNavigation,
    getInputValue,
    clearAndType,
    findActionButton,
    expandSettingsSectionFor,
    expandAllSettingsSections,

    // Logging
    log,

    // Results
    TestResults,
    escapeXml,
};