File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 11import { describe , expect , it } from "bun:test"
2+ import { readdirSync } from "node:fs"
3+ import { join } from "node:path"
24import pkg from "../package.json"
35import { agents , description , name , version } from "../src/index.ts"
46
@@ -25,4 +27,14 @@ describe("index.ts exports", () => {
2527 it ( "should have 3 agents" , ( ) => {
2628 expect ( agents ) . toHaveLength ( 3 )
2729 } )
30+
31+ it ( "should have matching agent files in agents/ directory" , ( ) => {
32+ const agentsDir = join ( import . meta. dirname , ".." , "agents" )
33+ const files = readdirSync ( agentsDir )
34+ const mdFiles = files . filter ( ( f ) => f . endsWith ( ".md" ) )
35+ const agentNamesFromFiles = mdFiles . map ( ( f ) => f . replace ( / \. m d $ / , "" ) ) . sort ( )
36+ const agentNamesFromExport = [ ...agents ] . sort ( )
37+
38+ expect ( agentNamesFromExport ) . toEqual ( agentNamesFromFiles )
39+ } )
2840} )
You can’t perform that action at this time.
0 commit comments