Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Post articles and image-text content to WeChat Official Account via API or Chrome CDP, with markdown-to-WeChat HTML conversion.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
scripts/copy-to-clipboard-mac.test.ts
1import assert from "node:assert/strict";2import fs from "node:fs";3import path from "node:path";4import test from "node:test";5import { fileURLToPath } from "node:url";67const __filename = fileURLToPath(import.meta.url);8const __dirname = path.dirname(__filename);9const clipboardScript = fs.readFileSync(path.join(__dirname, "copy-to-clipboard.ts"), "utf8");1011test("macOS image clipboard copy avoids Swift AppKit JIT", () => {12assert.match(clipboardScript, /copyImageMacWithOsascript/);13assert.doesNotMatch(clipboardScript, /await runCommand\('swift', \[swiftPath, 'image', imagePath\]\)/);14});1516test("macOS image clipboard copy converts WebP to PNG before AppleScript", () => {17assert.match(clipboardScript, /convertWebpMacToPng/);18assert.match(clipboardScript, /path\.extname\(imagePath\)\.toLowerCase\(\) === '\.webp'/);19assert.match(clipboardScript, /await copyImageMacWithOsascript\(pngPath\)/);20});21