From fef832de25ab5aa3b19b9f2d899da9c332f5ae5e Mon Sep 17 00:00:00 2001 From: Norman Breau Date: Sun, 9 May 2021 17:16:31 -0300 Subject: [PATCH] test: spy on semver.satisfies to remove the need to have the actual correct java version installed --- spec/unit/check_reqs.spec.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/unit/check_reqs.spec.js b/spec/unit/check_reqs.spec.js index 2a9cace8bc..39a6901672 100644 --- a/spec/unit/check_reqs.spec.js +++ b/spec/unit/check_reqs.spec.js @@ -24,6 +24,7 @@ var path = require('path'); var events = require('cordova-common').events; var which = require('which'); const { CordovaError } = require('cordova-common'); +const semver = require('semver'); // This should match /bin/templates/project/build.gradle const DEFAULT_TARGET_API = 30; @@ -67,6 +68,7 @@ describe('check_reqs', function () { }); it('should return the correct version if javac prints _JAVA_OPTIONS', async () => { + spyOn(semver, 'satisfies').and.returnValue(true); check_reqs.__set__({ java: { getVersion: async () => {