syncable-entity-testing

Generate integration tests for syncable entities in Twenty.

54.6k|8.4k|Updated Dec 1, 2022
One-click install
npx skills add https://github.com/twentyhq/twenty --skill syncable-entity-testing-twentyhq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: syncable-entity-testing
Source: https://github.com/twentyhq/twenty/tree/main/.cursor/skills/syncable-entity-testing
Command: npx skills add https://github.com/twentyhq/twenty --skill syncable-entity-testing-twentyhq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive framework for creating integration tests for syncable entities, ensuring data integrity and preventing regressions.

Core Features & Use Cases

  • Automated Testing: Generates and executes integration tests for CRUD operations, validation exceptions, and input transpilation errors.
  • Test Utilities: Includes reusable query factories and wrapper functions for efficient test writing.
  • Use Case: When developing a new metadata entity, use this Skill to automatically generate a full suite of integration tests that cover all success and failure scenarios, ensuring the entity behaves as expected before deployment.

Quick Start

Use the syncable-entity-testing skill to create integration tests for the 'my-entity' syncable entity.

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 TypeScript?

To write integration tests for syncable entities in TypeScript, generate comprehensive test suites covering CRUD operations, validator exceptions, and input transpilation errors. Use reusable query factories and wrapper functions to ensure all success and failure scenarios are validated before deployment.

What are syncable entity integration tests and when do I need them?

Syncable entity integration tests validate data integrity by executing CRUD operations, testing validator exceptions, and catching input transpilation errors. You need them when developing new metadata entities to prevent regressions and ensure expected behavior across all scenarios.

Can I automatically generate failing scenario tests for CRUD operations?

Yes, you can automatically generate failing scenario tests for CRUD operations using provided test patterns. The framework creates test utilities, query factories, and wrapper functions that systematically validate validator exceptions and input transpilation errors for syncable entities.

Does this testing framework cover input transpilation errors and validation exceptions?

Yes, the testing framework explicitly covers input transpilation errors and validation exceptions. It generates integration tests that verify both successful CRUD operations and failing scenarios, ensuring mandatory testing for all syncable entities.

What's the best way to ensure data integrity for new metadata entities before deployment?

The best way to ensure data integrity for new metadata entities is generating a full suite of integration tests covering all success and failure scenarios. Validate CRUD operations, validator exceptions, and input transpilation errors using reusable query factories and test utilities.

Why are my syncable entity integration tests missing validation exceptions?

Syncable entity integration tests miss validation exceptions when lacking comprehensive patterns for failing scenarios. Generate tests covering validator exceptions and input transpilation errors alongside CRUD operations using reusable query factories and wrapper functions to ensure complete coverage.