test: add import tests for all packages

This commit is contained in:
Amin Yahyaabadi 2025-05-20 03:26:08 -07:00
parent fc5f36e99b
commit 264de9ab1a
5 changed files with 45 additions and 10 deletions

View File

@ -1,2 +1,11 @@
// eslint-disable-next-line import/no-unassigned-import
import "../src/index.js"
import { error, info, notice, success, warning } from "../src/index.js"
describe("ci-log", () => {
it("should be a function", () => {
expect(error).toBeInstanceOf(Function)
expect(success).toBeInstanceOf(Function)
expect(warning).toBeInstanceOf(Function)
expect(notice).toBeInstanceOf(Function)
expect(info).toBeInstanceOf(Function)
})
})

View File

@ -1,2 +1,10 @@
// eslint-disable-next-line import/no-unassigned-import
import "../src/index.js"
import { addEnv, addPath, finalizeRC, sourceRC } from "../src/index.js"
describe("envosman", () => {
it("should be a function", () => {
expect(addEnv).toBeInstanceOf(Function)
expect(addPath).toBeInstanceOf(Function)
expect(finalizeRC).toBeInstanceOf(Function)
expect(sourceRC).toBeInstanceOf(Function)
})
})

View File

@ -1,2 +1,9 @@
// eslint-disable-next-line import/no-unassigned-import
import "../src/index.js"
import { execPowershell, execPowershellSync, getPowerShell } from "../src/index.js"
describe("exec-powershell", () => {
it("should be a function", () => {
expect(execPowershell).toBeInstanceOf(Function)
expect(execPowershellSync).toBeInstanceOf(Function)
expect(getPowerShell).toBeInstanceOf(Function)
})
})

View File

@ -1,2 +1,8 @@
// eslint-disable-next-line import/no-unassigned-import
import "../src/index.js"
import { hasApk, installApkPack } from "../src/index.js"
describe("setup-alpine", () => {
it("should be a function", () => {
expect(installApkPack).toBeInstanceOf(Function)
expect(hasApk).toBeInstanceOf(Function)
})
})

View File

@ -1,2 +1,7 @@
// eslint-disable-next-line import/no-unassigned-import
import "../src/index.js"
import { untildifyUser } from "../src/index.js"
describe("untildify-user", () => {
it("should be a function", () => {
expect(untildifyUser).toBeInstanceOf(Function)
})
})