Features: - 30+ Custom Skills (cognitive, development, UI/UX, autonomous agents) - RalphLoop autonomous agent integration - Multi-AI consultation (Qwen) - Agent management system with sync capabilities - Custom hooks for session management - MCP servers integration - Plugin marketplace setup - Comprehensive installation script Components: - Skills: always-use-superpowers, ralph, brainstorming, ui-ux-pro-max, etc. - Agents: 100+ agents across engineering, marketing, product, etc. - Hooks: session-start-superpowers, qwen-consult, ralph-auto-trigger - Commands: /brainstorm, /write-plan, /execute-plan - MCP Servers: zai-mcp-server, web-search-prime, web-reader, zread - Binaries: ralphloop wrapper Installation: ./supercharge.sh
64 lines
1.9 KiB
TypeScript
64 lines
1.9 KiB
TypeScript
import { describe, expect, test } from 'bun:test';
|
|
import { envTruthy } from '../src/core/env.ts';
|
|
|
|
describe('envTruthy', () => {
|
|
test("returns true for '1'", () => {
|
|
process.env.TEST_ENV_TRUTHY = '1';
|
|
expect(envTruthy('TEST_ENV_TRUTHY')).toBe(true);
|
|
delete process.env.TEST_ENV_TRUTHY;
|
|
});
|
|
|
|
test("returns true for 'true'", () => {
|
|
process.env.TEST_ENV_TRUTHY = 'true';
|
|
expect(envTruthy('TEST_ENV_TRUTHY')).toBe(true);
|
|
delete process.env.TEST_ENV_TRUTHY;
|
|
});
|
|
|
|
test("returns true for 'TRUE'", () => {
|
|
process.env.TEST_ENV_TRUTHY = 'TRUE';
|
|
expect(envTruthy('TEST_ENV_TRUTHY')).toBe(true);
|
|
delete process.env.TEST_ENV_TRUTHY;
|
|
});
|
|
|
|
test("returns true for 'True'", () => {
|
|
process.env.TEST_ENV_TRUTHY = 'True';
|
|
expect(envTruthy('TEST_ENV_TRUTHY')).toBe(true);
|
|
delete process.env.TEST_ENV_TRUTHY;
|
|
});
|
|
|
|
test("returns false for 'false'", () => {
|
|
process.env.TEST_ENV_TRUTHY = 'false';
|
|
expect(envTruthy('TEST_ENV_TRUTHY')).toBe(false);
|
|
delete process.env.TEST_ENV_TRUTHY;
|
|
});
|
|
|
|
test("returns false for 'FALSE'", () => {
|
|
process.env.TEST_ENV_TRUTHY = 'FALSE';
|
|
expect(envTruthy('TEST_ENV_TRUTHY')).toBe(false);
|
|
delete process.env.TEST_ENV_TRUTHY;
|
|
});
|
|
|
|
test("returns false for '0'", () => {
|
|
process.env.TEST_ENV_TRUTHY = '0';
|
|
expect(envTruthy('TEST_ENV_TRUTHY')).toBe(false);
|
|
delete process.env.TEST_ENV_TRUTHY;
|
|
});
|
|
|
|
test('returns false for empty string', () => {
|
|
process.env.TEST_ENV_TRUTHY = '';
|
|
expect(envTruthy('TEST_ENV_TRUTHY')).toBe(false);
|
|
delete process.env.TEST_ENV_TRUTHY;
|
|
});
|
|
|
|
test('returns false for undefined', () => {
|
|
delete process.env.TEST_ENV_TRUTHY;
|
|
expect(envTruthy('TEST_ENV_TRUTHY')).toBe(false);
|
|
});
|
|
|
|
test('returns false for random string', () => {
|
|
process.env.TEST_ENV_TRUTHY = 'yes';
|
|
expect(envTruthy('TEST_ENV_TRUTHY')).toBe(false);
|
|
delete process.env.TEST_ENV_TRUTHY;
|
|
});
|
|
});
|