Skip to content

Commit

Permalink
test: verify Ti.Platform.versionPatch
Browse files Browse the repository at this point in the history
  • Loading branch information
sgtcoolguy committed Aug 31, 2020
1 parent 68839cb commit 11b7739
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/Resources/ti.platform.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
/* global OS_VERSION_MAJOR, OS_VERSION_MINOR, OS_IOS */
/* global OS_VERSION_MAJOR, OS_VERSION_MINOR, OS_VERSION_PATCH, OS_IOS */
/* eslint-env mocha */
/* eslint no-unused-expressions: "off" */
'use strict';
Expand Down Expand Up @@ -308,6 +308,15 @@ describe('Titanium.Platform', function () {
should(Ti.Platform.versionMinor).be.eql(versionMinor);
});

it('.versionPatch', () => {
should(Ti.Platform).have.readOnlyProperty('versionPatch').which.is.a.Number();
should(Ti.Platform.versionPatch).be.eql(OS_VERSION_PATCH);

const versionComponents = Ti.Platform.version.split('.');
const versionPatch = (versionComponents.length >= 3) ? parseInt(versionComponents[2]) : 0;
should(Ti.Platform.versionPatch).be.eql(versionPatch);
});

it.ios('.identifierForVendor', () => {
should(Ti.Platform.identifierForVendor).be.a.String();
should(Ti.Platform.getIdentifierForVendor).be.a.Function();
Expand Down

0 comments on commit 11b7739

Please sign in to comment.