import fs from 'node:fs/promises';
import os from 'node:os';
import path from 'node:path';
import { describe, expect, it } from 'vitest';
import { expandGlobs } from ':expandGlobs';
describe('expandGlobs', () => {
it('returns matched files', async () => {
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'globs-'));
const file = path.join(tmp, 'doc.ts.md');
await fs.writeFile(file, '', 'utf8');
const files = await expandGlobs([`${tmp}/*.ts.md`]);
expect(files).toEqual([file]);
await fs.rm(tmp, { recursive: true, force: true });