Registry / testing / test-combo

test-combo

JSON →
library0.0.2jsnpmunverified

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.

npm install test-combo
INSTALL
IMPORT
SIG · TEST-COMBO
T
test-combo
testingjavascriptv0.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import testCombo from 'test-combo'
const testCombo = require('test-combo')
test-combo ships as ESM only (no CJS support). Use import syntax.
TestCombo
import { TestCombo } from 'test-combo'
import TestCombo from 'test-combo'
Named export TestCombo is the class constructor. Default export is the same but less explicit.
Factor
import { Factor } from 'test-combo'
const Factor = require('test-combo').Factor
Factor is a named export, not a default. Use destructured import.
Condition
import { Condition } from 'test-combo'
import { Condition } from 'test-combo/dist/index.js'
Condition is part of the public API; no subpath import needed.

Generate Jest test cases from factor combinations with condition-based assertions. Shows Factor/Condition API and test generation.

import testCombo, { Factor, Condition } from 'test-combo'; const add = (a, b) => a + b; testCombo({ name: 'add', test: (factor, condition) => { if (condition === 'positive') { expect(add(factor.a, factor.b)).toBeGreaterThan(0); } else { expect(add(factor.a, factor.b)).toBeLessThanOrEqual(0); } }, factors: [ { name: 'a', values: [1, 2, -1, -2] }, { name: 'b', values: [3, -3, 0, 5] }, ], conditions: [ { name: 'positive', filter: (f) => f.a + f.b > 0 }, { name: 'non-positive', filter: (f) => f.a + f.b <= 0 }, ], });
Debug
Known issues
breakingtest-combo requires Jest as a peer dependency. Ensure Jest is installed and configured, or tests will fail to execute.
fix
Install jest: npm install --save-dev jest
affects: >=0.0.1
deprecatedThe default export testCombo is deprecated in favor of the named export TestCombo in future versions.
fix
Use import { TestCombo } from 'test-combo' instead of default import.
affects: 0.0.x
gotchaFactor values are deep-equality compared; avoid using non-serializable objects (e.g., functions) to prevent unexpected behavior.
fix
Use primitive values or plain objects for factor values.
affects: >=0.0.1
Errors
Common errors & fixes
TypeError: testCombo is not a function
Using CommonJS require() on an ESM-only package.
fix
Switch to ESM: add 'type': 'module' to package.json or use import syntax.
Cannot find module 'jest'
Jest is not installed as a devDependency.
fix
Run npm install --save-dev jest
testCombo is not a function (or undefined)
Importing default incorrectly with named import syntax.
fix
Use import testCombo from 'test-combo'
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies
jestrequiredRuntime peer dependency; test-combo runs on top of Jest and requires Jest as the test runner.
Agent activity
2 hits · last 30 days
node
2
Resources
test-combo — npm install test-combo · libregistry