pingidentity/aic-mcp-server · Archived

testing

Required conventions for writing and modifying tests — framework, file template, section ordering, and security test requirements.

First seen May 20, 2026

Installation

$ npx skills add pingidentity/aic-mcp-server --skill testing

Summary

  • Required conventions for writing and modifying tests — framework, file template, section ordering, and security test requirements.
  • TRIGGER when: creating or modifying any file under test/; adding, changing, or removing tool parameters or response behavior that requires test updates; user asks about testing patterns or test structure.

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from pingidentity/aic-mcp-server.

npx skills add pingidentity/aic-mcp-server

Browse all from pingidentity/aic-mcp-server

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 2
License LICENSE
Default branch main
Open issues 1
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,475 B
  • docs SUMMARY.md 352 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 8 installs

SKILL.md

Testing

Framework: Vitest + MSW (Mock Service Worker). Tests mirror source structure under test/tools/<category>/.

Core principle: Test our application logic (request construction, response processing, input validation, error handling), not the API itself.

Test File Template

import { describe, it, expect } from 'vitest';
import { myNewToolTool } from '../../../src/tools/category/myNewTool.js';
import { snapshotTest } from '../../helpers/snapshotTest.js';
import { setupTestEnvironment } from '../../helpers/testEnvironment.js';
import { server } from '../../setup.js';
import { http, HttpResponse } from 'msw';

describe('myNewTool', () => {
  const getSpy = setupTestEnvironment(); // Sets AIC_BASE_URL, spies on makeAuthenticatedRequest

  // 1. Snapshot test (required for every tool)
  it('should match tool schema snapshot', async () => {
    await snapshotTest('myNewTool', myNewToolTool);
  });

  // 2. Request construction — verify URL, scopes, method, body via spy
  describe('Request Construction', () => {
    it('constructs correct URL', async () => {
      await myNewToolTool.toolFunction({ param1: 'value' });
      const [url, scopes, options] = getSpy().mock.calls.at(-1)!;
      expect(url).toBe('https://test.forgeblocks.com/your/api/endpoint');
      expect(scopes).toEqual(['fr:idm:*']);
    });
  });

  // 3. Response handling — use server.use() to provide MSW responses
  // 4. Input validation — test Zod schemas directly
  // 5. Error handling — override handlers with error responses
});

Section Ordering

  1. Snapshot Test
  2. Request Construction
  3. Response Handling
  4. Input Validation
  5. Error Handling

Complex orchestration tools add "Application Logic" after snapshot tests.

Security Tests

Always include for tools that accept user input:

  • Path traversal prevention for ID parameters (schema.parse('../etc/passwd') should throw)
  • Query injection prevention for user-provided filter strings

After Adding a Tool

Run npm run test:snapshots:update to create its snapshot, then npm test to verify.