-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathget_keys.test.ts
21 lines (16 loc) · 912 Bytes
/
get_keys.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* eslint max-len: 0 */
import { getKeys } from '../src/helpers';
describe('getKeys', () => {
it('returns the applicable keys for a major key symbol', () => {
expect(getKeys('A')).toEqual(['A', 'Bb', 'B', 'C', 'C#', 'Db', 'D', 'Eb', 'E', 'F', 'F#', 'Gb', 'G', 'G#', 'Ab']);
});
it('returns the applicable keys for a minor key symbol', () => {
expect(getKeys('Dm')).toEqual(['F#m', 'Gm', 'G#m', 'Am', 'Bbm', 'Bm', 'Cm', 'C#m', 'Dm', 'D#m', 'Ebm', 'Em', 'Fm']);
});
it('returns the applicable keys for a major key solfege', () => {
expect(getKeys('La')).toEqual(['La', 'Sib', 'Si', 'Do', 'Do#', 'Reb', 'Re', 'Mib', 'Mi', 'Fa', 'Fa#', 'Solb', 'Sol', 'Sol#', 'Lab']);
});
it('returns the applicable keys for a minor key solfege', () => {
expect(getKeys('Rem')).toEqual(['Fa#m', 'Solm', 'Sol#m', 'Lam', 'Sibm', 'Sim', 'Dom', 'Do#m', 'Rem', 'Re#m', 'Mibm', 'Mim', 'Fam']);
});
});