Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve tests #2

Open
danigb opened this issue Jan 19, 2017 · 0 comments
Open

Improve tests #2

danigb opened this issue Jan 19, 2017 · 0 comments

Comments

@danigb
Copy link
Contributor

danigb commented Jan 19, 2017

Currently the test are failing, although I think it's easy to fix it. However looking at the tests is painful since they are all inside the same file. My proposal:

  • Separate benchmarks from tests. Create a benchmarks folder.
  • Split the gen.tests.js by module.
  • Fix the failing tests
  • Add missing tests

Here's my output:

  50 passing (96ms)
  5 failing

  1) monops should generate a value of PI/2 for asin( 1 ):

      AssertionError: 1.5707963705062866 == 1.5707963267948966
      + expected - actual

      -1.5707963705062866
      +1.5707963267948966
      
      at Context.it (tests/gen.tests.js:202:12)

  2) monops should generate a value of PI/2 for acos(0):

      AssertionError: 1.5707963705062866 == 1.5707963267948966
      + expected - actual

      -1.5707963705062866
      +1.5707963267948966
      
      at Context.it (tests/gen.tests.js:211:12)

  3) monops should generate a value of PI/4 for atan( 1 ):

      AssertionError: 0.7853981852531433 == 0.7853981633974483
      + expected - actual

      -0.7853981852531433
      +0.7853981633974483
      
      at Context.it (tests/gen.tests.js:238:12)

  4) rate should cause a phasor with an frequency of 4410 to ramp to -.5 after five executions instead of 0:
     AssertionError: '0.50' == -0.5
      at Context.it (tests/gen.tests.js:600:12)

  5) data + peek should return the value of 49 when indexing uisng phase w/ peek:

      AssertionError: 0 == 49
      + expected - actual

      -0
      +49
      
      at Context.it (tests/gen.tests.js:629:12)


npm ERR! Test failed.  See above for more details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant