mirror of
https://github.com/web-infra-dev/midscene.git
synced 2025-11-22 21:16:52 +00:00
18 lines
543 B
TypeScript
18 lines
543 B
TypeScript
import { buildYaml, flowItemBrief } from '@/yaml';
|
|
import { describe, expect, test } from 'vitest';
|
|
|
|
describe('utils', () => {
|
|
test('build yaml', () => {
|
|
const yaml = buildYaml({ url: 'https://www.baidu.com' }, []);
|
|
expect(yaml).toMatchSnapshot();
|
|
});
|
|
|
|
test('action brief text', () => {
|
|
expect(flowItemBrief({ ai: 'search for weather' })).toMatchSnapshot();
|
|
expect(flowItemBrief({ sleep: 1000 })).toMatchSnapshot();
|
|
expect(
|
|
flowItemBrief({ aiWaitFor: 'wait for something' }),
|
|
).toMatchSnapshot();
|
|
});
|
|
});
|