The design language that makes your AI harness better at design.
JavaScript
Add regression tests for Antigravity provider transform and CLI lifecycle
Paweł Adamczak1efdff9aea25
diff --git a/tests/build.test.js b/tests/build.test.jsindex 7ed58bbee..44a21dd8d 100644--- a/tests/build.test.js+++ b/tests/build.test.js@@ -148,6 +148,7 @@ This is a test skill body.`;transformers.transformClaudeCode(skills, DIST_DIR, patterns);transformers.transformGemini(skills, DIST_DIR, patterns);transformers.transformCodex(skills, DIST_DIR, patterns);+ transformers.transformAntigravity(skills, DIST_DIR, patterns);// Verify Cursor outputsexpect(fs.existsSync(path.join(DIST_DIR, 'cursor/.cursor/skills/test-skill/SKILL.md'))).toBe(true);@@ -160,6 +161,9 @@ This is a test skill body.`;// Verify Codex outputsexpect(fs.existsSync(path.join(DIST_DIR, 'codex/.codex/skills/test-skill/SKILL.md'))).toBe(true);++ // Verify Antigravity outputs+ expect(fs.existsSync(path.join(DIST_DIR, 'antigravity/.agent/skills/test-skill/SKILL.md'))).toBe(true);});test('integration: emits native subagent files for Codex, Claude Code, GitHub Copilot, and Cursor', () => {@@ -356,6 +360,18 @@ Please audit {{target}} for technical quality. Ask {{model}} for help.`;expect(fs.existsSync(path.join(DIST_DIR, 'github/.github/skills'))).toBe(true);expect(fs.existsSync(path.join(DIST_DIR, 'kiro/.kiro/skills'))).toBe(true);});++ test('Antigravity transformer emits skills under .agent/', () => {+ const { skills } = utils.readSourceFiles(TEST_DIR);+ const patterns = utils.readPatterns(TEST_DIR);+ const DIST_DIR = path.join(TEST_DIR, 'dist');++ // Should not throw+ transformers.transformAntigravity(skills, DIST_DIR, patterns);++ // Verify the harness directory is created at the correct path+ expect(fs.existsSync(path.join(DIST_DIR, 'antigravity/.agent/skills'))).toBe(true);+ });});// Resolve a relative import specifier against the importer's bundle-relativediff --git a/tests/skills-cli.test.js b/tests/skills-cli.test.jsindex c2708a9c7..86ecc63d8 100644--- a/tests/skills-cli.test.js+++ b/tests/skills-cli.test.js@@ -788,6 +788,47 @@ describe('skills install/update: local universal bundle e2e', () => {rmSync(tmp, { recursive: true, force: true });}, 15000);+ test('installs Antigravity skills into .agent/ with --providers=antigravity', () => {+ const tmp = mkdtempSync(join(tmpdir(), 'imp-test-antigravity-install-'));+ execSync('git init', { cwd: tmp });+ const bundleRoot = createFakeUniversalBundle(tmp, ['.agent']);++ const output = run('skills install -y --providers=antigravity --no-hooks', {+ cwd: tmp,+ env: { ...process.env, IMPECCABLE_BUNDLE_PATH: bundleRoot },+ });+ expect(output).toContain('Done!');++ const skillDir = join(tmp, '.agent', 'skills', 'impeccable');+ expect(existsSync(join(skillDir, 'SKILL.md'))).toBe(true);+ expect(readFileSync(join(skillDir, 'SKILL.md'), 'utf8')).toContain('Local deterministic bundle for .agent.');+ expect(existsSync(join(skillDir, 'scripts', 'context.mjs'))).toBe(true);++ rmSync(tmp, { recursive: true, force: true });+ }, 15000);++ test('updates stale Antigravity skills at .agent/ from the local bundle', () => {+ const tmp = mkdtempSync(join(tmpdir(), 'imp-test-antigravity-update-'));+ execSync('git init', { cwd: tmp });+ const bundleRoot = createFakeUniversalBundle(tmp, ['.agent']);++ const skillDir = join(tmp, '.agent', 'skills', 'impeccable');+ mkdirSync(skillDir, { recursive: true });+ writeFileSync(join(skillDir, 'SKILL.md'), '---\nname: impeccable\nstale: true\n---\nOld content.\n');++ const output = run('skills update -y --no-hooks', {+ cwd: tmp,+ env: { ...process.env, IMPECCABLE_BUNDLE_PATH: bundleRoot },+ });+ expect(output).toContain('Updated');++ const content = readFileSync(join(skillDir, 'SKILL.md'), 'utf8');+ expect(content).not.toContain('stale: true');+ expect(content).toContain('version: 9.9.9-local');++ rmSync(tmp, { recursive: true, force: true });+ }, 15000);+test('interactive install explains home detections and can target the project root', () => {const tmp = mkdtempSync(join(tmpdir(), 'imp-test-interactive-project-'));const home = mkdtempSync(join(tmpdir(), 'imp-home-interactive-project-'));