UNPKG

als-statistics

Version:

Modular JS statistics toolkit for Node.js and the browser: descriptive stats, correlations (Pearson/Spearman/Kendall), t-tests & ANOVA (Student/Welch), reliability (Cronbach’s alpha), regression (linear/logistic), clustering (DBSCAN/HDBSCAN), and table/co

12 lines (11 loc) 497 B
import { describe, it } from 'node:test'; import assert from 'node:assert'; import outliersZScore from '../../lib/descriptive/z-outliers.js'; describe('outliersZScore function', () => { it('should detect no outliers', () => { const result = outliersZScore({ zScores: [0, 1, -1, 2, -2], values: [1, 2, 3, 4, 5] }, 3); assert.deepStrictEqual(result.values, []); assert.deepStrictEqual(result.indexes, []); assert.deepStrictEqual(result.zScores, []); }); });