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 Scale Generator tests #1906

Open
dem4ron opened this issue Sep 23, 2022 · 0 comments
Open

Improve Scale Generator tests #1906

dem4ron opened this issue Sep 23, 2022 · 0 comments

Comments

@dem4ron
Copy link
Member

dem4ron commented Sep 23, 2022

Hey!

I'd like to suggest some improvements on the Scale Generator tests.

I think in this form these tests are not correct.

The intervals.length should be scale.length - 1.

    test('Simple major scale', () => {
-      const expected = ['C', 'D', 'E', 'F', 'G', 'A', 'B'];
+      const expected = ['C', 'D', 'E', 'F', 'G', 'A', 'B', 'C'];
      expect(new Scale('C').interval('MMmMMMm')).toEqual(expected);
    });

Check the walkthrough at the end of problem-specs description., or tests in other languages, e.g. Rust

This change breaks the proof solution, which I think is a good solution but not ideal if you'd like to generate scales based on any random input in this system. e.g. AAAAAAAAAAAA

I'd also suggest updating the instructions.md, as it seems to be behind the problem-specs description.

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