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
muslnode 18–226 runs
build_error
glibcnode 18–226 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 },
],
});
Errors
Common errors & fixes
TypeError: testCombo is not a function
Using CommonJS require() on an ESM-only package.
fixSwitch to ESM: add 'type': 'module' to package.json or use import syntax.
Cannot find module 'jest'
Jest is not installed as a devDependency.
fixRun npm install --save-dev jest
testCombo is not a function (or undefined)
Importing default incorrectly with named import syntax.
fixUse import testCombo from 'test-combo'
Audit
Dependencies
jestrequiredRuntime peer dependency; test-combo runs on top of Jest and requires Jest as the test runner.