Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartmemo committed Jul 29, 2014
1 parent d45736e commit 84e8687
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/qh-tests.js
Expand Up @@ -63,6 +63,20 @@ describe('Qwerty Hancock tests', function () {
}
});

it('First key on keyboard should be user defined note', function () {
var qh = new QwertyHancock({startNote: 'C4'}),
first_white_key = element.querySelector('li[data-note-type="white"]');

expect(first_white_key.id).toBe('C4');
});

it('First key on keyboard should be natural of user defined note if sharp', function () {
var qh = new QwertyHancock({startNote: 'F#2'}),
first_white_key = element.querySelector('li[data-note-type="white"]');

expect(first_white_key.id).toBe('F2');
});

it('When user presses key on computer keyboard, related keyboard key should change colour', function () {
var qh = new QwertyHancock(),
c4_key = document.querySelector('#C4');
Expand Down

0 comments on commit 84e8687

Please sign in to comment.