BDD / TDD assertion framework for node.js and the browser that can be paired with any testing framework.
This report summarizes scanner evidence for chaijs/chai, a JavaScript project with 8,265 GitHub stars. SynthScan examined 34,331 lines of code across 71 source files, recording 192 pattern matches distributed across 3 syntactic categories. The legacy adjusted pattern signal is 47.2 (High pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 19 finding(s).
Are imports declared and package/API names verified? 173 finding(s).
Are wrappers, guards, and repeated structures necessary? 14 finding(s).
Which changes need focused human review? 192 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 192 distinct pattern matches across 3 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | ReleaseNotes.md | 211 | expect(true).to.be.true.and.not.false(); | CODE |
| CRITICAL⚡ | test/expect.js | 924 | expect('foo').to.have.length.of.at.least(4, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 928 | expect('foo', 'blah').to.have.length.of.at.least(4); | CODE |
| CRITICAL⚡ | test/expect.js | 936 | expect([ 1, 2, 3 ]).to.have.length.of.at.least(4, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 944 | expect([ 1, 2, 3, 4 ]).to.not.have.length.of.at.least(4, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 948 | expect([ 1, 2, 3, 4 ]).to.not.have.lengthOf.at.least(4, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 987 | expect(new Map()).to.have.length.of.at.least(0); | CODE |
| CRITICAL⚡ | test/expect.js | 995 | expect(map).to.have.length.of.at.least(3); | CODE |
| CRITICAL⚡ | test/expect.js | 999 | expect(map).to.have.length.of.at.least(4, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 1006 | expect(new Set()).to.have.length.of.at.least(0); | CODE |
| CRITICAL⚡ | test/expect.js | 1014 | expect(set).to.have.length.of.at.least(3); | CODE |
| CRITICAL⚡ | test/expect.js | 1018 | expect(set).to.have.length.of.at.least(4, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 1208 | expect('foo').to.have.length.of.at.most(2, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 1212 | expect('foo', 'blah').to.have.length.of.at.most(2); | CODE |
| CRITICAL⚡ | test/expect.js | 1220 | expect([ 1, 2, 3 ]).to.have.length.of.at.most(2, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 1228 | expect([ 1, 2 ]).to.not.have.length.of.at.most(2, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 1232 | expect([ 1, 2 ]).to.not.have.lengthOf.at.most(2, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 1260 | expect(1).to.have.length.of.at.most(0, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 1264 | expect(1, 'blah').to.have.length.of.at.most(0); | CODE |
| CRITICAL⚡ | test/expect.js | 1271 | expect(new Map()).to.have.length.of.at.most(0); | CODE |
| CRITICAL⚡ | test/expect.js | 1279 | expect(map).to.have.length.of.at.most(3); | CODE |
| CRITICAL⚡ | test/expect.js | 1283 | expect(map).to.have.length.of.at.most(2, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 1290 | expect(new Set()).to.have.length.of.at.most(0); | CODE |
| CRITICAL⚡ | test/expect.js | 1298 | expect(set).to.have.length.of.at.most(3); | CODE |
| CRITICAL⚡ | test/expect.js | 1302 | expect(set).to.have.length.of.at.most(2, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 1331 | expect(now).to.have.length.of.at.most(2, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 1335 | expect('foo', 'blah').to.have.length.of.at.most(now); | CODE |
| CRITICAL⚡ | test/expect.js | 1339 | expect([ 1, 2, 3 ]).to.not.have.length.of.at.most(now, 'blah'); | CODE |
| CRITICAL⚡ | test/expect.js | 2055 | expect(obj).to.not.have.deep.own.property('a', {z: 1}); | CODE |
| CRITICAL⚡ | test/expect.js | 2058 | expect(obj).to.not.have.deep.own.property('a', {b: 7}); | CODE |
| CRITICAL⚡ | test/expect.js | 2061 | expect(obj).to.not.have.deep.own.property('toString', Object.prototype.toString); | CODE |
| CRITICAL⚡ | test/expect.js | 2146 | expect(obj).to.not.have.deep.nested.property('a.b', {c: 7}); | CODE |
| CRITICAL⚡ | test/expect.js | 2147 | expect(obj).to.not.have.deep.nested.property('a.b', {z: 1}); | CODE |
| CRITICAL⚡ | test/expect.js | 2148 | expect(obj).to.not.have.deep.nested.property('a.z', {c: 1}); | CODE |
| CRITICAL⚡ | test/expect.js | 2711 | expect(testMap).to.not.contain.all.deep.keys({thisIs: 'anExampleObject'}, 'thisDoesNotExist'); | CODE |
| CRITICAL⚡ | test/expect.js | 2713 | expect(testMap).to.not.have.any.deep.keys({iDoNot: 'exist'}); | CODE |
| CRITICAL⚡ | test/expect.js | 2714 | expect(testMap).to.not.have.any.deep.keys('thisIsNotAkey', {iDoNot: 'exist'}, {33: 20}); | CODE |
| CRITICAL⚡ | test/expect.js | 2715 | expect(testMap).to.not.have.all.deep.keys('thisDoesNotExist', 'thisToo', {doingThisBecauseOf: 'referential equality' | CODE |
| CRITICAL⚡ | test/expect.js | 2722 | expect(testMap).to.not.have.any.deep.keys([{13: 37}, 'thisDoesNotExist', 'thisToo']); | CODE |
| CRITICAL⚡ | test/expect.js | 2723 | expect(testMap).to.not.have.any.deep.keys([20, 1, {13: 37}]); | CODE |
| CRITICAL⚡ | test/expect.js | 2724 | expect(testMap).to.not.have.all.deep.keys([{thisIs: 'anExampleObject'}, {'iDoNot': 'exist'}]); | CODE |
| CRITICAL⚡ | test/expect.js | 2838 | expect(testSet).to.not.contain.all.deep.keys({thisIs: 'anExampleObject'}, 'thisDoesNotExist'); | CODE |
| CRITICAL⚡ | test/expect.js | 2840 | expect(testSet).to.not.have.any.deep.keys({iDoNot: 'exist'}); | CODE |
| CRITICAL⚡ | test/expect.js | 2841 | expect(testSet).to.not.have.any.deep.keys('thisIsNotAkey', {iDoNot: 'exist'}, {33: 20}); | CODE |
| CRITICAL⚡ | test/expect.js | 2842 | expect(testSet).to.not.have.all.deep.keys('thisDoesNotExist', 'thisToo', {doingThisBecauseOf: 'referential equality' | CODE |
| CRITICAL⚡ | test/expect.js | 2849 | expect(testSet).to.not.have.any.deep.keys([{13: 37}, 'thisDoesNotExist', 'thisToo']); | CODE |
| CRITICAL⚡ | test/expect.js | 2850 | expect(testSet).to.not.have.any.deep.keys([20, 1, {13: 37}]); | CODE |
| CRITICAL⚡ | test/expect.js | 2851 | expect(testSet).to.not.have.all.deep.keys([{thisIs: 'anExampleObject'}, {'iDoNot': 'exist'}]); | CODE |
| CRITICAL | test/expect.js | 906 | expect('foo').to.have.length.of.at.least(2); | CODE |
| CRITICAL | test/expect.js | 908 | expect([ 1, 2, 3 ]).to.have.length.of.at.least(2); | CODE |
| CRITICAL | test/expect.js | 1190 | expect('foo').to.have.length.of.at.most(4); | CODE |
| CRITICAL | test/expect.js | 1192 | expect([ 1, 2, 3 ]).to.have.length.of.at.most(4); | CODE |
| CRITICAL | test/expect.js | 2074 | expect(obj).to.not.have.deep.own.property('a', {b: 1}, 'blah'); | CODE |
| CRITICAL | test/expect.js | 2159 | expect(obj).to.not.have.deep.nested.property('a.b', {c: 1}, 'blah'); | CODE |
| CRITICAL | test/utilities.js | 434 | expect([1, 2, 3]).to.be.a.thing.with.length.above(2); | CODE |
| CRITICAL | test/utilities.js | 588 | expect([1, 2, 3]).to.be.an.foo.length.below(1000); | CODE |
| CRITICAL | test/utilities.js | 594 | expect([1, 2, 3]).to.be.a.foo.with.length.above(2); | CODE |
| CRITICAL⚡ | test/should.js | 849 | (new Map()).should.have.length.of.at.least(0); | CODE |
| CRITICAL⚡ | test/should.js | 857 | map.should.have.length.of.at.least(3); | CODE |
| CRITICAL⚡ | test/should.js | 858 | map.should.have.lengthOf.at.least(3); | CODE |
| 113 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | test/configuration.js | 76 | function badOverwrittenPropertyAssertion() { | CODE |
| LOW⚡ | test/configuration.js | 82 | function badOverwrittenMethodAssertion() { | CODE |
| LOW⚡ | test/configuration.js | 85 | function badChainableMethodAssertion() { | CODE |
| LOW⚡ | test/configuration.js | 88 | function badOverwrittenChainableMethodAssertion() { | CODE |
| LOW⚡ | test/configuration.js | 370 | function badOverwrittenPropertyAssertion() { | CODE |
| LOW⚡ | test/configuration.js | 376 | function badOverwrittenMethodAssertion() { | CODE |
| LOW⚡ | test/configuration.js | 379 | function badChainableMethodAssertion() { | CODE |
| LOW⚡ | test/configuration.js | 382 | function badOverwrittenChainableMethodAssertion() { | CODE |
| LOW | lib/chai/core/assertions.js | 2157 | function assertOwnPropertyDescriptor(name, descriptor, msg) { | CODE |
| LOW | lib/chai/utils/overwriteProperty.js | 55 | get: function overwritingPropertyGetter() { | CODE |
| LOW | lib/chai/utils/getOwnEnumerableProperties.js | 22 | export function getOwnEnumerableProperties(obj) { | CODE |
| LOW | lib/chai/utils/getOwnEnumerablePropertySymbols.js | 20 | export function getOwnEnumerablePropertySymbols(obj) { | CODE |
| LOW | lib/chai/utils/overwriteChainableMethod.js | 59 | function overwritingChainableMethodGetter() { | CODE |
| LOW | lib/chai/utils/overwriteChainableMethod.js | 74 | chainableBehavior.method = function overwritingChainableMethodWrapper() { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lib/chai/utils/addChainableMethod.js | 121 | // frames from the stack trace of a failed assertion. | COMMENT |
| LOW | lib/chai/utils/overwriteProperty.js | 61 | // the `lockSsfi` flag isn't set and proxy protection is disabled. | COMMENT |
| LOW | lib/chai/utils/overwriteMethod.js | 61 | // function to be the starting point for removing implementation frames from | COMMENT |
| LOW | lib/chai/utils/addProperty.js | 41 | Object.defineProperty(ctx, name, { | COMMENT |
| LOW | lib/chai/utils/addMethod.js | 41 | /** | COMMENT |