mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-02 21:34:30 +08:00
23 lines
867 B
JavaScript
23 lines
867 B
JavaScript
import { describe, it, expect } from "vitest"
|
|
import fs from "fs"
|
|
import path from "path"
|
|
|
|
const REFS_DIR = path.join(__dirname, "..", "..", "..", "skills", "generating-apex", "references")
|
|
|
|
describe("generating-apex: reference files are valid", () => {
|
|
it("references directory exists and has .cls files", () => {
|
|
const files = fs.readdirSync(REFS_DIR).filter((f) => f.endsWith(".cls"))
|
|
expect(files.length).toBeGreaterThan(0)
|
|
})
|
|
|
|
it("all reference files are non-empty", () => {
|
|
const files = fs.readdirSync(REFS_DIR).filter((f) => f.endsWith(".cls"))
|
|
for (const file of files) {
|
|
const content = fs.readFileSync(path.join(REFS_DIR, file), "utf8")
|
|
expect(content.trim().length, `${file} should not be empty`).toBeGreaterThan(0)
|
|
}
|
|
})
|
|
|
|
// TODO: Add more tests - validate class names match filenames, check for ApexDoc, etc.
|
|
})
|