Skip to content

Commit

Permalink
add tests to include new platform
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomontero committed Dec 9, 2024
1 parent b62cc30 commit 9baddeb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/platform.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe('platform.js', () => {

describe('expected tags for selected platforms', () => {
const expectedTags = {
electron2: ['electron2', 'gen3', 'cellular', 'udp', 'ble', 'nrf52840'],
p2: ['p2', 'gen4', 'wifi', 'ble', 'udp', 'rtl872x'],
tracker: ['tracker', 'gen3', 'som', 'cellular', 'ble', 'udp', 'gnss', 'nrf52840'],
trackerm: ['trackerm', 'gen3', 'som', 'cellular', 'ble', 'udp', 'gnss', 'rtl872x'],
Expand All @@ -32,6 +33,16 @@ describe('platform.js', () => {
p1: ['p1', 'gen2', 'wifi', 'tcp', 'stm32f2xx'],
photon: ['photon', 'gen2', 'wifi', 'tcp', 'stm32f2xx']
};

it('provides all expected for electron2', () => {
const electron2 = platformForName('electron2');
expect(electron2).to.be.an.instanceOf(Platform);
expect(electron2.id).to.eql(37);
expect(electron2.name).to.eql('electron2');
expect(electron2.displayName).to.eql('Electron 2');
expect(electron2.tags).to.include.members(expectedTags.electron2);
});

it('provides all expected data for p2', () => {
const p2 = platformForName('p2');
expect(p2).to.be.an.instanceOf(Platform);
Expand Down

0 comments on commit 9baddeb

Please sign in to comment.