Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(windows): Remove window platform references from tests #269

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 7 additions & 8 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
*/

/* global WinJS, device */
/* global device */

exports.defineAutoTests = function () {
const fail = function (done, context, message) {
Expand Down Expand Up @@ -59,7 +59,6 @@ exports.defineAutoTests = function () {
};

// On Windows, some tests prompt user for permission to use geolocation and interrupt autotests run
const isWindowsStore = cordova.platformId === 'windows8' || (cordova.platformId === 'windows' && !WinJS.Utilities.isPhone); // eslint-disable-line no-undef
let majorDeviceVersion = null;
const versionRegex = /(\d)\..+/.exec(device.version);
if (versionRegex !== null) {
Expand Down Expand Up @@ -94,7 +93,7 @@ exports.defineAutoTests = function () {
describe('getCurrentPosition method', function () {
describe('error callback', function () {
it('geolocation.spec.5 should be called if we set timeout to 0 and maximumAge to a very small number', function (done) {
if (isWindowsStore || skipAndroid) {
if (skipAndroid) {
pending();
}

Expand All @@ -105,7 +104,7 @@ exports.defineAutoTests = function () {
});

it('geolocation.spec.9 on failure should return PositionError object with error code constants', function (done) {
if (isWindowsStore || skipAndroid) {
if (skipAndroid) {
pending();
}

Expand All @@ -128,7 +127,7 @@ exports.defineAutoTests = function () {

describe('success callback', function () {
it('geolocation.spec.6 should be called with a Position object', function (done) {
if (isWindowsStore || skipAndroid) {
if (skipAndroid) {
pending();
}

Expand Down Expand Up @@ -172,7 +171,7 @@ exports.defineAutoTests = function () {
});

it('geolocation.spec.7 should be called if we set timeout to 0 and maximumAge to a very small number', function (done) {
if (isWindowsStore || skipAndroid) {
if (skipAndroid) {
pending();
}

Expand All @@ -188,7 +187,7 @@ exports.defineAutoTests = function () {
});

it('geolocation.spec.10 on failure should return PositionError object with error code constants', function (done) {
if (isWindowsStore || skipAndroid) {
if (skipAndroid) {
pending();
}

Expand Down Expand Up @@ -221,7 +220,7 @@ exports.defineAutoTests = function () {
});

it('geolocation.spec.8 should be called with a Position object', function (done) {
if (isWindowsStore || skipAndroid || isIOSSim) {
if (skipAndroid || isIOSSim) {
pending();
}

Expand Down