mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-04-11 17:29:44 +00:00

* chore: add extension templates * feat: add create-kunkun and cli package * fix: cli and create-kunkun package location * fix: cli package test * ci: run test for CI pipeline only on Linux The most important E2E test is run with docker, Linux anyways, no need to run on Mac and Windows
31 lines
968 B
TypeScript
31 lines
968 B
TypeScript
import { expect, test } from "bun:test"
|
|
import path from "path"
|
|
import { getRootDir } from "@/constants"
|
|
import fs from "fs-extra"
|
|
import { verifyCmd } from "../src/commands/verify"
|
|
|
|
const rootDir = getRootDir()
|
|
const extensionsDir = path.join(rootDir, "../../packages/extensions")
|
|
const templatesDir = path.join(rootDir, "../../templates")
|
|
|
|
const extsPaths = fs
|
|
.readdirSync(extensionsDir)
|
|
.map((extensionName) => path.join(extensionsDir, extensionName))
|
|
.filter((extPath) => fs.statSync(extPath).isDirectory())
|
|
const templatesPaths = fs
|
|
.readdirSync(templatesDir)
|
|
.map((templateName) => path.join(templatesDir, templateName))
|
|
.filter((extPath) => fs.statSync(extPath).isDirectory())
|
|
|
|
test("Verify Extensions", () => {
|
|
for (const extPath of extsPaths) {
|
|
expect(verifyCmd(extPath, false)).toBeTrue()
|
|
}
|
|
})
|
|
|
|
// test("Verify Templates", () => {
|
|
// for (const templatePath of templatesPaths) {
|
|
// expect(verifyCmd(templatePath, false)).toBeTrue()
|
|
// }
|
|
// })
|