Shortest使用

1. 首先安装pnpm, brew install pnpm

2. 在terminal执行npm init

3. pnpm add @antiwork/shortest

4. touch shortest.config.ts, 内容如下:

import  { ShortestConfig } from "@antiwork/shortest";

export default {

  anthropicKey: 'keyValue',

  headless: false,

  baseUrl: "https://www.google.com",

  testPattern: "**/*.test.ts",

} satisfies ShortestConfig;

5.创建examples文件夹或者其它文件夹都可;

6. 在examples目录下创建文件hello.test.ts,内容如下:

import { shortest } from "@antiwork/shortest";

shortest("search something and make sure the results displayed")

7. 在shortest.config.ts文件所在目录执行pnpm shortest 

 

参考:

https://github.com/anti-work/shortest/issues/143

posted @ 2025-01-09 17:47  jiguanghover  阅读(73)  评论(0)    收藏  举报