项目文件夹

文件
wehub-resource-sync 070959e133
landing-page-staging / Deploy landing page to staging (push) Has been skipped
landing-page-ci / Validate landing page (push) Failing after 4s
visual-baseline / Capture visual baselines (push) Has been cancelled
bake-plugin-previews / Bake plugin previews (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:00:47 +08:00

32 行
1.0 KiB
TypeScript

import { describe, expect, it } from 'vitest';
import { buildContinueInCliToast } from '../../src/lib/build-continue-in-cli-toast';
describe('buildContinueInCliToast', () => {
it('prefixes every success path with clipboard confirmation', () => {
expect(
buildContinueInCliToast('/work/acme', { kind: 'host', ok: true }),
).toEqual({
message:
'Copied to clipboard. Folder opened. Run `claude` in your terminal here and paste the prompt.',
details: null,
});
expect(
buildContinueInCliToast('/work/acme', { kind: 'host', ok: false }),
).toEqual({
message:
"Copied to clipboard. Couldn't open the folder. Open your terminal at /work/acme, run `claude`, and paste the prompt.",
details: null,
});
expect(
buildContinueInCliToast('/work/acme', { kind: 'web-fallback', ok: true }),
).toEqual({
message:
'Copied to clipboard. Open your terminal at /work/acme, run `claude`, and paste the prompt.',
details: null,
});
});
});