MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / assertMapEqual

Function assertMapEqual

packages/node-runtime/src/nlp/segmenter.test.ts:24–29  ·  view source on GitHub ↗
(actual: Map<string, number>, expected: Map<string, number>, label: string)

Source from the content-addressed store, hash-verified

22]
23
24function assertMapEqual(actual: Map<string, number>, expected: Map<string, number>, label: string): void {
25 assert.equal(actual.size, expected.size, `${label}: size mismatch`)
26 for (const [key, value] of expected) {
27 assert.equal(actual.get(key), value, `${label}: value mismatch for "${key}"`)
28 }
29}
30
31describe('batchSegmentChineseWithStats 与旧两遍分词等价', () => {
32 it('meaningful 模式:词频/总数/去重数/词性统计均一致', () => {

Callers 1

segmenter.test.tsFile · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected