saebekassebil / teoria

Javascript taught Music Theory
http://saebekassebil.github.io/teoria
MIT License
1.32k stars 114 forks source link

Accept TeoriaInterval in to parameter of teoria.interval #58

Closed benmurrell closed 10 years ago

benmurrell commented 10 years ago

This changeset modifies the teoria.interval function so that it will accept an instance of TeoriaInterval.

saebekassebil commented 10 years ago

Looks good! Do you mind moving that if statement one up, so the to teoria.interval.from comes after each other (nitbit, sorry).

And if you want to just add a test to the test/interval.js it'd be great!

benmurrell commented 10 years ago

I'll get a test in the commit tonight - I updated the order of the if statements as requested & pushed that up before I saw the rest of the message about the test!

benmurrell commented 10 years ago

Alright - got the tests in & ran the test suite:

✓ OK » 248 honored (0.065s)

I wasn't sure of where to put the tests exactly, but as is they add coverage for the direct path via teoria.interval( note, interval ) and via the path that spurred the change - teoria.note.interval( interval ).

saebekassebil commented 10 years ago

Merged as version 1.2.0 - Thank you Ben