{"id":18853,"library":"test-combo","title":"test-combo","description":"A testing framework built on top of Jest that generates test cases from configuration-driven combinatorial inputs. Current stable version 0.0.2 (published 2022-11-30). Enables high-coverage testing by defining factors and their conditions, then automatically generating all combinations as Jest test cases. Differentiates from parameterized testing libraries by providing a declarative factor/condition model and built-in support for setup/teardown per combination. Release cadence is unknown; appears to be a pre-1.0 package with limited adoption.","status":"active","version":"0.0.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","jest","test","unit test","integration test"],"install":[{"cmd":"npm install test-combo","lang":"bash","label":"npm"},{"cmd":"yarn add test-combo","lang":"bash","label":"yarn"},{"cmd":"pnpm add test-combo","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime peer dependency; test-combo runs on top of Jest and requires Jest as the test runner.","package":"jest","optional":false}],"imports":[{"note":"test-combo ships as ESM only (no CJS support). Use import syntax.","wrong":"const testCombo = require('test-combo')","symbol":"default","correct":"import testCombo from 'test-combo'"},{"note":"Named export TestCombo is the class constructor. Default export is the same but less explicit.","wrong":"import TestCombo from 'test-combo'","symbol":"TestCombo","correct":"import { TestCombo } from 'test-combo'"},{"note":"Factor is a named export, not a default. Use destructured import.","wrong":"const Factor = require('test-combo').Factor","symbol":"Factor","correct":"import { Factor } from 'test-combo'"},{"note":"Condition is part of the public API; no subpath import needed.","wrong":"import { Condition } from 'test-combo/dist/index.js'","symbol":"Condition","correct":"import { Condition } from 'test-combo'"}],"quickstart":{"code":"import testCombo, { Factor, Condition } from 'test-combo';\n\nconst add = (a, b) => a + b;\n\ntestCombo({\n  name: 'add',\n  test: (factor, condition) => {\n    if (condition === 'positive') {\n      expect(add(factor.a, factor.b)).toBeGreaterThan(0);\n    } else {\n      expect(add(factor.a, factor.b)).toBeLessThanOrEqual(0);\n    }\n  },\n  factors: [\n    { name: 'a', values: [1, 2, -1, -2] },\n    { name: 'b', values: [3, -3, 0, 5] },\n  ],\n  conditions: [\n    { name: 'positive', filter: (f) => f.a + f.b > 0 },\n    { name: 'non-positive', filter: (f) => f.a + f.b <= 0 },\n  ],\n});","lang":"typescript","description":"Generate Jest test cases from factor combinations with condition-based assertions. Shows Factor/Condition API and test generation."},"warnings":[{"fix":"Install jest: npm install --save-dev jest","message":"test-combo requires Jest as a peer dependency. Ensure Jest is installed and configured, or tests will fail to execute.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Use import { TestCombo } from 'test-combo' instead of default import.","message":"The default export testCombo is deprecated in favor of the named export TestCombo in future versions.","severity":"deprecated","affected_versions":"0.0.x"},{"fix":"Use primitive values or plain objects for factor values.","message":"Factor values are deep-equality compared; avoid using non-serializable objects (e.g., functions) to prevent unexpected behavior.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Switch to ESM: add 'type': 'module' to package.json or use import syntax.","cause":"Using CommonJS require() on an ESM-only package.","error":"TypeError: testCombo is not a function"},{"fix":"Run npm install --save-dev jest","cause":"Jest is not installed as a devDependency.","error":"Cannot find module 'jest'"},{"fix":"Use import testCombo from 'test-combo'","cause":"Importing default incorrectly with named import syntax.","error":"testCombo is not a function (or undefined)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}