Function filterTestFilePaths

  • Takes an iterable of URLs and only yields the ones that finish with .test.*.

    Example

    filterTestFilePaths(["/path/to/tests/a.test.js", "/path/to/tests/b.ts"]); // ["/path/to/tests/a.test.js"]
    

    Yields

    Test URLs.

    Parameters

    Returns AsyncGenerator<{
        hash: string;
        host: string;
        hostname: string;
        href: string;
        origin: string;
        password: string;
        pathname: string;
        port: string;
        protocol: string;
        search: string;
        searchParams: { readonly append: (name: string, value: string) => void; readonly delete: (name: string) => void; readonly get: (name: string) => string | null; readonly getAll: (name: string) => string[]; ... 9 more ...; readonly size: number; };
        username: string;
        toJSON() => string;
        toString() => string;
    }, void, unknown>