Skip to content

Commit

Permalink
Update algorithm.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
thusarakap committed Mar 25, 2024
1 parent 57f2be9 commit 404847c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/algorithm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@ describe('negateDBValues', () => {

test('negates dB values and applies caps for portable speaker type', () => {
const dBValues = [-10, -10, 10, 10, 10, 10, 10];
const speakerType = 'portable speaker';
const speakerType = 'portable';
const result = negateDBValues(dBValues, speakerType);
expect(result).toEqual([4, 5, -10, -10, -10, -10, -10]);
});

test('negates dB values and applies caps for soundbars speaker type', () => {
const dBValues = [10, 10, 10, -10, -10, -10, -10];
const speakerType = 'soundbars';
const speakerType = 'soundbar';
const result = negateDBValues(dBValues, speakerType);
expect(result).toEqual([-10, -10, -10, 10, 6, 6, 6]);
});

test('negates dB values and applies caps for Outdoor speakers type', () => {
const dBValues = [10, 10, 10, 10, 10, -10, -10];
const speakerType = 'Outdoor speakers';
const speakerType = 'outdoor';
const result = negateDBValues(dBValues, speakerType);
expect(result).toEqual([-10, -10, -10, -10, -10, 6, 7]);
});

test('negates dB values and applies caps for Gaming speakers type', () => {
const dBValues = [10, 10, 10, 10, -10, -10, 10];
const speakerType = 'Gaming speakers';
const speakerType = 'desktop';
const result = negateDBValues(dBValues, speakerType);
expect(result).toEqual([-10, -10, -10, -10, 7, 8, -10]);
});

test('negates dB values and applies caps for Bluetooth Speakers type', () => {
const dBValues = [-10, -10, 10, 10, 10, 10, 10];
const speakerType = 'Bluetooth Speakers';
const speakerType = 'floorstanding';
const result = negateDBValues(dBValues, speakerType);
expect(result).toEqual([5, 5, -10, -10, -10, -10, -10]);
});
Expand Down

0 comments on commit 404847c

Please sign in to comment.