forked from llessi06/opencode-llama.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.ts
More file actions
31 lines (26 loc) · 813 Bytes
/
Copy pathtest.ts
File metadata and controls
31 lines (26 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Test script to verify the plugin exports correctly
import {LlamaCppPlugin} from "./src"
// Log the imported value
console.log("Plugin type:", typeof LlamaCppPlugin)
// Try to call it if it's a function
if (typeof LlamaCppPlugin === "function") {
console.log("✓ Plugin is a function")
} else {
console.error("✗ Plugin is not a function")
process.exit(1)
}
// Test that it has the V2 Plugin shape
const plugin = LlamaCppPlugin as any
if (plugin.id) {
console.log("✓ Plugin has id:", plugin.id)
} else {
console.error("✗ Plugin missing id")
process.exit(1)
}
if (typeof plugin.setup === "function") {
console.log("✓ Plugin has setup function")
} else {
console.error("✗ Plugin missing setup function")
process.exit(1)
}
console.log("\n✅ All checks passed!")