<commit_before>#! /usr/bin/env jest

import { ExplorerProgram } from "../explorer/ExplorerProgram"
import { ExplorerAdminServer } from "./ExplorerAdminServer"

it("can init", async () => {
    const server = new ExplorerAdminServer(__dirname, "https://example.com")
    expect(server).toBeTruthy()

    expect(
        await server.renderExplorerPage(
            new ExplorerProgram("foo", "explorerTitle helloWorld")
        )
    ).toContain("helloWorld")

    const allExplorersResult = await server.getAllExplorersCommand()
    expect(allExplorersResult.success).toBeTruthy()
})<commit_msg>test: wait up to 10s for ExplorerAdminServer to initialize<commit_after>#! /usr/bin/env jest

import { ExplorerProgram } from "../explorer/ExplorerProgram"
import { ExplorerAdminServer } from "./ExplorerAdminServer"

it("can init", async () => {
    jest.setTimeout(10000) // wait up to 10s

    const server = new ExplorerAdminServer(__dirname, "https://example.com")
    expect(server).toBeTruthy()

    expect(
        await server.renderExplorerPage(
            new ExplorerProgram("foo", "explorerTitle helloWorld")
        )
    ).toContain("helloWorld")

    const allExplorersResult = await server.getAllExplorersCommand()
    expect(allExplorersResult.success).toBeTruthy()
})
{'fraction_non_alphanumeric': 0.12177985948477751, 'fraction_numerical': 0.00702576112412178, 'mean_word_length': 3.9883268482490273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4428463', 'n_tokens_mistral': 400, 'n_tokens_neox': 359, 'n_words': 79}