mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2024-12-04 20:21:08 -05:00
19 lines
636 B
TypeScript
19 lines
636 B
TypeScript
|
import {MockGlobber} from './glob-mock';
|
||
|
|
||
|
describe('mocked globber tests', () => {
|
||
|
it('globber should return generator', async () => {
|
||
|
const globber = new MockGlobber(['aaa', 'bbb', 'ccc']);
|
||
|
const generator = globber.globGenerator();
|
||
|
const result: string[] = [];
|
||
|
for await (const itemPath of generator) {
|
||
|
result.push(itemPath);
|
||
|
}
|
||
|
expect(result).toEqual(['aaa', 'bbb', 'ccc']);
|
||
|
});
|
||
|
it('globber should return glob', async () => {
|
||
|
const globber = new MockGlobber(['aaa', 'bbb', 'ccc']);
|
||
|
const result: string[] = await globber.glob();
|
||
|
expect(result).toEqual(['aaa', 'bbb', 'ccc']);
|
||
|
});
|
||
|
});
|