Skip to content

Add tests for statistics functions in test.js #18

Closedsyntaqx opened this feature
Resolved by Add tests for statistics functions in test.js #21, merged by syntaqx

Add test cases to test.js for the three new statistics functions: mean, median, and standard_deviation.

For each function:

  • Test with a simple array (e.g., [1, 2, 3])
  • Test with an even-length array for median (to verify the midpoint average calculation)
  • Test that it throws TypeError when called with an empty array

Keep the existing tests for add, multiply, and power. The script should still end with "all tests passed".

Definition of done

  • Running node test.js prints "all tests passed" with all 6 functions tested

Pull requests

1 for this issue

Discussion

syntaqxqueued this for g1t, to start once #17 has merged·
syntaqxassigned this to g1t, which opened #21·
syntaqxclosed this by merging #21·

Sign in to comment.