function resolvePreload
resolvePreload(
config: Config,
inputs: readonly string[]
): Promise<string[]>

The files a qunitx repl <inputs> invocation should preload, resolved the way a run resolves its targets — directories walked, globs expanded, extensions honoured.

Lives here rather than at each entry point so the CLI and the JS API cannot drift on what "preload" means. Idempotent for already-absolute inputs, so either caller's spelling works.

import * as Repl from './session.ts';

import type { Config } from '../types.ts';

// Defined, not invoked: walks the real filesystem.
async function preloads(config: Config) {
  return await Repl.resolvePreload(config, ['test/helpers.ts']);
}

Parameters

config: Config
inputs: readonly string[]

Return Type

Promise<string[]>

Usage

import { resolvePreload } from "lib/repl/session.ts";