{"id":24662315,"url":"https://github.com/0xjcf/ignite-test","last_synced_at":"2026-05-15T12:32:24.365Z","repository":{"id":273902680,"uuid":"921253424","full_name":"0xjcf/ignite-test","owner":"0xjcf","description":"ignite-test is a lightweight testing framework for web components and state-driven logic. It provides unified utilities for XState, Redux, and MobX.","archived":false,"fork":false,"pushed_at":"2025-07-22T10:57:32.000Z","size":83,"stargazers_count":0,"open_issues_count":25,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-26T00:28:44.315Z","etag":null,"topics":["ignite-element","mobx","redux","testing-framework","typescript","web-componenets","xstate"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xjcf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-23T16:14:25.000Z","updated_at":"2025-01-24T22:45:55.000Z","dependencies_parsed_at":"2025-01-23T17:27:52.135Z","dependency_job_id":"1d6f3de5-e194-4a1d-b84d-8188a5556e29","html_url":"https://github.com/0xjcf/ignite-test","commit_stats":null,"previous_names":["0xjcf/ignite-test"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0xjcf/ignite-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xjcf%2Fignite-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xjcf%2Fignite-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xjcf%2Fignite-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xjcf%2Fignite-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xjcf","download_url":"https://codeload.github.com/0xjcf/ignite-test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xjcf%2Fignite-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ignite-element","mobx","redux","testing-framework","typescript","web-componenets","xstate"],"created_at":"2025-01-26T04:13:56.751Z","updated_at":"2026-05-15T12:32:24.350Z","avatar_url":"https://github.com/0xjcf.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **ignite-test**\n\n**ignite-test** is a lightweight and extensible testing framework for modern web development. Built to test state-driven logic and web components, it supports **XState**, **Redux**, and **MobX** with a unified API. **ignite-test** focuses on making testing effortless, reliable, and performance-aware.\n\n---\n\n## **🚀 Why igniteTest?**\n\n### 1. **Unified API Across State Management Libraries**\n- Whether you’re using **Redux**, **XState**, or **MobX**, the test syntax remains exactly the same.\n- Focus on **what to test**, not **how to adapt your tests** to a specific library.\n\n### 2. **Simplified Test Syntax**\n- Tests automatically execute when `igniteTest` is called—no extra boilerplate required.\n\n### 3. **State Validation Made Easy**\n- Use the **`state`** property to explicitly set the starting state in **isolated tests**.\n- Built-in support for `assert`, `pending`, `resolve`, and `reject` ensures seamless workflow validation.\n\n---\n\n## **🌟 Core Features**\n\n### **Unified Test Workflow**\n- **`state`**: Explicitly define the initial state for isolated tests.\n- **`assert`**: Validate the initial state.\n- **`pending`**: Validate intermediate states.\n- **`resolve`**: Validate success states.\n- **`reject`**: Validate failure states.\n\n### **Reusable Test Logic**\n- Define reusable test commands for shared logic (e.g., `idle` and `pending` states).\n- Compose commands into success and failure paths.\n\n---\n\n## **📚 Documentation**\n\n- **[GitHub Discussions](https://github.com/0xjcf/ignite-test/discussions/1)**: Share your feedback, ask questions, or suggest features.\n- **[Wiki](https://github.com/0xjcf/ignite-test/wiki)**: Explore detailed documentation, examples, and the roadmap.\n\n---\n\n## **Examples**\n\n### **1. Isolated Tests with `state`**\n\n#### Redux Isolated Tests\n\n```typescript\nigniteTest({\n  component: MyLoginForm,\n  stateHandlers: loginReducer,\n  describe: 'Isolated LoginForm Tests (Redux)',\n  e2e: false, // Ensure each test is independent (optional - default is false)\n  tests: [\n    {\n      it: 'Should validate initial state',\n      state: { isSubmitting: false, error: null }, // Explicitly set the starting state\n      assert: ({ state, root }) =\u003e {\n        expect(state.isSubmitting).toBe(false);\n        expect(state.error).toBe(null);\n        expect(root.querySelector('.form')).toBeVisible();\n      },\n    },\n    {\n      it: 'Should validate pending state after SUBMIT',\n      state: { isSubmitting: false, error: null },\n      actions: [submit()],\n      pending: ({ state, root }) =\u003e {\n        expect(state.isSubmitting).toBe(true);\n        expect(root.querySelector('.spinner')).toBeVisible();\n      },\n    },\n    {\n      it: 'Should validate success state after SUCCESS',\n      state: { isSubmitting: true, error: null },\n      actions: [submitSuccess()],\n      resolve: ({ state, root }) =\u003e {\n        expect(state.isSubmitting).toBe(false);\n        expect(state.error).toBe(null);\n        expect(root.querySelector('.success-message')).toHaveTextContent('Login Successful!');\n      },\n    },\n    {\n      it: 'Should validate error state after FAILURE',\n      state: { isSubmitting: true, error: null },\n      actions: [submitFailure()],\n      reject: ({ state, root }) =\u003e {\n        expect(state.isSubmitting).toBe(false);\n        expect(state.error).toBe('Login Failed');\n        expect(root.querySelector('.error-message')).toHaveTextContent('Login Failed!');\n      },\n    },\n  ],\n});\n```\n\n---\n\n### **2. E2E Tests**\n\n#### Success Path (Resolve)\n\n```typescript\nigniteTest({\n  component: MyLoginForm,\n  stateHandlers: loginReducer,\n  describe: 'E2E LoginForm Success Path (Redux)',\n  e2e: true, // Shared state across tests\n  tests: [\n    {\n      it: 'Should validate idle state',\n      assert: ({ state, root }) =\u003e {\n        expect(state.isSubmitting).toBe(false);\n        expect(state.error).toBe(null);\n        expect(root.querySelector('.form')).toBeVisible();\n      },\n    },\n    {\n      it: 'Should validate pending state after SUBMIT',\n      actions: [submit()],\n      pending: ({ state, root }) =\u003e {\n        expect(state.isSubmitting).toBe(true);\n        expect(root.querySelector('.spinner')).toBeVisible();\n      },\n    },\n    {\n      it: 'Should validate resolve state after SUCCESS',\n      actions: [submitSuccess()],\n      resolve: ({ state, root }) =\u003e {\n        expect(state.isSubmitting).toBe(false);\n        expect(state.error).toBe(null);\n        expect(root.querySelector('.success-message')).toHaveTextContent('Login Successful!');\n      },\n    },\n  ],\n});\n```\n\n---\n\n#### Failure Path (Reject)\n\n```typescript\nigniteTest({\n  component: MyLoginForm,\n  stateHandlers: loginReducer,\n  describe: 'E2E LoginForm Failure Path (Redux)',\n  e2e: true, // Shared state across tests\n  tests: [\n    {\n      it: 'Should validate idle state',\n      assert: ({ state, root }) =\u003e {\n        expect(state.isSubmitting).toBe(false);\n        expect(state.error).toBe(null);\n        expect(root.querySelector('.form')).toBeVisible();\n      },\n    },\n    {\n      it: 'Should validate pending state after SUBMIT',\n      actions: [submit()],\n      pending: ({ state, root }) =\u003e {\n        expect(state.isSubmitting).toBe(true);\n        expect(root.querySelector('.spinner')).toBeVisible();\n      },\n    },\n    {\n      it: 'Should validate reject state after FAILURE',\n      actions: [submitFailure()],\n      reject: ({ state, root }) =\u003e {\n        expect(state.isSubmitting).toBe(false);\n        expect(state.error).toBe('Login Failed');\n        expect(root.querySelector('.error-message')).toHaveTextContent('Login Failed!');\n      },\n    },\n  ],\n});\n```\n\n---\n\n## **Key Advantages**\n\n#### **Isolated Tests with `state`**\n- Fully self-contained tests with explicitly defined starting states.\n\n#### **E2E Tests**\n- Automatically validate state progression across shared workflows without needing additional conditions.\n\n#### **Logical Separation of Success and Failure Paths**\n- Independent test suites for **resolve** and **reject** ensure clarity and maintainability.\n\n#### **Consistency Across Libraries**\n- The same API (`state`, `assert`, `pending`, `resolve`, `reject`) works seamlessly with **Redux**, **XState**, and **MobX**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xjcf%2Fignite-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xjcf%2Fignite-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xjcf%2Fignite-test/lists"}