From 16860864e139cda057d4f45d75897ecb2b08757f Mon Sep 17 00:00:00 2001 From: Erisu Date: Wed, 30 Mar 2022 15:28:19 +0900 Subject: [PATCH 1/2] test(android): fix tests to run on cordova-android 10.x that defaults to https scheme --- tests/tests.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/tests.js b/tests/tests.js index 80862c32..b442cd94 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -3435,9 +3435,14 @@ exports.defineAutoTests = function () { /* These specs verify that FileEntries have a toNativeURL method * which appears to be sane. */ - var pathExpect = cordova.platformId === 'windowsphone' ? '//nativ' : 'file://'; // eslint-disable-line no-undef - - if (isChrome) { + var pathExpect = 'file://'; + + if (cordova.platformId === 'android') { + // Starting from Cordova-Android 10.x, the app content is served from the https scheme + pathExpect = 'https://'; + } else if (cordova.platformId === 'windowsphone') { + pathExpect = '//nativ'; + } else if (isChrome) { pathExpect = 'filesystem:http://'; } From c946b78428d63b9ddd448759bf408c09eccede23 Mon Sep 17 00:00:00 2001 From: Erisu Date: Wed, 30 Mar 2022 16:00:53 +0900 Subject: [PATCH 2/2] style: add cordova to lint globals --- .eslintrc.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 902048d3..b6f153dd 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -1,6 +1,10 @@ root: true extends: '@cordova/eslint-config/browser' +globals: + cordova: true overrides: - - files: [tests/**/*.js] - extends: '@cordova/eslint-config/node-tests' + - files: [tests/**/*.js] + extends: '@cordova/eslint-config/node-tests' + globals: + cordova: true