«««< HEAD
This directory contains automated tests for the MBTQ Universe deaf-first platform APIs.
tests/
├── deafauth/ # DeafAUTH (Identity Cortex) tests
├── pinksync/ # PinkSync (Accessibility Engine) tests
├── fibonrose/ # Fibonrose (Trust & Blockchain) tests
├── magicians/ # 360Magicians (AI Agents) tests
├── dao/ # DAO (Governance) tests
└── openapi.test.js # OpenAPI specification validation tests
npm install
npm test
npm run test:coverage
npm run test:watch
# DeafAUTH tests
npm test -- tests/deafauth
# PinkSync tests
npm test -- tests/pinksync
# 360Magicians tests
npm test -- tests/magicians
# Fibonrose tests
npm test -- tests/fibonrose
# DAO tests
npm test -- tests/dao
# OpenAPI validation tests
npm test -- tests/openapi.test.js
The test suite covers:
Follow the existing test patterns:
describe('Service Name API', () => {
const baseURL = 'https://api.mbtquniverse.com/service';
const authToken = 'Bearer valid_token';
beforeEach(() => {
jest.clearAllMocks();
});
describe('GET /endpoint', () => {
it('should perform expected action', async () => {
// Mock response
const mockResponse = {
data: { /* expected data */ }
};
axios.get.mockResolvedValue(mockResponse);
// Make request
const response = await axios.get(`${baseURL}/endpoint`, {
headers: { Authorization: authToken }
});
// Assertions
expect(response.data).toHaveProperty('expectedField');
});
});
});
These tests are designed to run in CI/CD pipelines:
# Example GitHub Actions workflow
- name: Run tests
run: npm test
- name: Generate coverage
run: npm run test:coverage
beforeEach to reset mocksThe tests are designed to match the OpenAPI specifications in services/*/openapi/openapi.yaml. When the specs change, update the corresponding tests.
npm run validate:openapi
This validates all OpenAPI specifications for:
Generate SDKs from OpenAPI specs:
# Generate TypeScript SDK
npm run generate:sdk:typescript
# Generate Python SDK
npm run generate:sdk:python
# Generate all SDKs
npm run generate:sdk
sdks/ directory.This directory contains automated tests for the MBTQ Universe deaf-first platform APIs.
tests/
├── deafauth/ # DeafAUTH (Identity Cortex) tests
├── pinksync/ # PinkSync (Accessibility Engine) tests
├── fibonrose/ # Fibonrose (Trust & Blockchain) tests
├── magicians/ # 360Magicians (AI Agents) tests
├── dao/ # DAO (Governance) tests
└── openapi.test.js # OpenAPI specification validation tests
npm install
npm test
npm run test:coverage
npm run test:watch
# DeafAUTH tests
npm test -- tests/deafauth
# PinkSync tests
npm test -- tests/pinksync
# 360Magicians tests
npm test -- tests/magicians
# Fibonrose tests
npm test -- tests/fibonrose
# DAO tests
npm test -- tests/dao
# OpenAPI validation tests
npm test -- tests/openapi.test.js
The test suite covers:
Follow the existing test patterns:
describe('Service Name API', () => {
const baseURL = 'https://api.mbtquniverse.com/service';
const authToken = 'Bearer valid_token';
beforeEach(() => {
jest.clearAllMocks();
});
describe('GET /endpoint', () => {
it('should perform expected action', async () => {
// Mock response
const mockResponse = {
data: { /* expected data */ }
};
axios.get.mockResolvedValue(mockResponse);
// Make request
const response = await axios.get(`${baseURL}/endpoint`, {
headers: { Authorization: authToken }
});
// Assertions
expect(response.data).toHaveProperty('expectedField');
});
});
});
These tests are designed to run in CI/CD pipelines:
# Example GitHub Actions workflow
- name: Run tests
run: npm test
- name: Generate coverage
run: npm run test:coverage
beforeEach to reset mocksThe tests are designed to match the OpenAPI specifications in services/*/openapi/openapi.yaml. When the specs change, update the corresponding tests.
npm run validate:openapi
This validates all OpenAPI specifications for:
Generate SDKs from OpenAPI specs:
# Generate TypeScript SDK
npm run generate:sdk:typescript
# Generate Python SDK
npm run generate:sdk:python
# Generate all SDKs
npm run generate:sdk
Generated SDKs will be in the sdks/ directory.
e961430… Add Node.js API automated tests and SDK generation capabilities