syncable-entity-testing

Creates integration tests for syncable metadata entities in Twenty covering validators and CRUD operations.

Updated Aug 3, 2026
One-click install
npx skills add https://github.com/masoodtalha/twenty --skill syncable-entity-testing-masoodtalha
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: syncable-entity-testing
Source: https://github.com/masoodtalha/twenty/tree/main/.cursor/skills/syncable-entity-testing
Command: npx skills add https://github.com/masoodtalha/twenty --skill syncable-entity-testing-masoodtalha

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing integration tests for new syncable entities in Twenty is mandatory but repetitive and error-prone. This Skill provides the complete patterns, file structures, and checklists needed to build a compliant test suite covering validator exceptions, input transpilation errors, and CRUD operations. ## Core Features & Use Cases - Test Utility Patterns: Provides the two-file pattern (GraphQL query factory plus wrapper utility) for create, update, and delete operations. - Failing Test Coverage: Templates for testing missing fields, empty strings, uniqueness violations, standard entity protection, and foreign key validation with snapshot assertions. - Successful Test Coverage: Templates for minimal input, optional fields, whitespace sanitization, and long text content scenarios. - Use Case: After implementing a new syncable entity in Twenty's metadata modules, use this Skill to generate the full integration test suite under test/integration/metadata/suites/ and verify it passes with Jest. ## Quick Start Ask the AI to create the complete integration test suite for your new syncable entity following the syncable-entity-testing patterns.

Frequently Asked Questions about syncable-entity-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write integration tests for syncable entities in Twenty?▼

Create query factory and wrapper utilities for each CRUD operation, then write failing tests covering validator exceptions and successful tests covering all use cases. Place files under test/integration/metadata/suites/your-entity/ and run them with Jest using the twenty-server config.

What test coverage is required for Twenty metadata entities?▼

Tests must cover missing required fields, empty strings, uniqueness violations, standard entity protection, foreign key validation, and successful creation, update, and deletion scenarios. Failing tests use snapshot assertions via expectOneNotInternalServerErrorSnapshot.

How do I run Twenty metadata integration tests with Jest?▼

Run npx jest with the path to your entity test suite and the flag --config=packages/twenty-server/jest.config.mjs. Add --updateSnapshot to regenerate snapshots after intentional error message changes.

Why do my Twenty integration tests fail with snapshot mismatches?▼

Snapshot mismatches occur when error messages or GraphQL response shapes change after validator or DTO updates. Review the diff to confirm the change is intentional, then regenerate snapshots with the --updateSnapshot flag and commit them.

When should integration tests be written in the syncable entity workflow?▼

Integration tests are the mandatory final step (Step 6) after completing entity definition, DTOs, validators, and resolvers in Steps 1-5. A syncable entity is not considered complete or production-ready without this test suite.