Skip to content

Add tests for statistics functions in test.js #124

Closedsyntaqx opened this feature

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

Repositories

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.