Skip to content

Commit

Permalink
Add tests for contract partial functions
Browse files Browse the repository at this point in the history
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipul@balena.io>
  • Loading branch information
vipulgupta2048 committed Feb 15, 2023
1 parent 424fc46 commit da3cd07
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/integration/models/device-type.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ describe('Device Type model', function () {
);
expect(partials).to.be.an('object');
expect(Object.keys(partials)).to.not.have.length(0);
expect(partials)
.to.have.property('partials')
.to.have.property('bootDevice');
expect(partials?.partials?.bootDevice[0]).to.equal(
'Connect power to the Raspberry Pi 2',
);
});
});

Expand All @@ -110,6 +116,14 @@ describe('Device Type model', function () {
);
expect(partials).to.be.an('Array');
expect(partials).to.not.have.length(0);
expect(partials).to.eql([
'Insert the sdcard to the host machine.',
'Write the balenaOS file you downloaded to the sdcard. We recommend using <a href="http://www.etcher.io/">Etcher</a>.',
'Wait for writing of balenaOS to complete.',
'Remove the sdcard from the host machine.',
'Insert the freshly flashed sdcard into the Raspberry Pi 2.',
'Connect power to the Raspberry Pi 2 to boot the device.',
]);
});
});

Expand Down

0 comments on commit da3cd07

Please sign in to comment.