This is an automated email from the ASF dual-hosted git repository. raphinesse pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cordova-ios.git
The following commit(s) were added to refs/heads/master by this push: new be06cf4 test(version): merge two test suites into one (#1187) be06cf4 is described below commit be06cf49b0392143a941e70e331a9c1b290e9e47 Author: Raphael von der GrĂ¼n <raphine...@gmail.com> AuthorDate: Tue Nov 9 09:40:42 2021 +0100 test(version): merge two test suites into one (#1187) --- package.json | 1 - tests/spec/component.json | 8 ----- tests/spec/component/versions.spec.js | 59 ----------------------------------- tests/spec/coverage.json | 1 - tests/spec/unit/versions.spec.js | 33 ++++++++++++++++++++ 5 files changed, 33 insertions(+), 69 deletions(-) diff --git a/package.json b/package.json index a282664..fdf7c26 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ "scripts": { "pretest": "npm run lint", "test": "npm run coverage && npm run objc-tests", - "test:component": "jasmine --config=tests/spec/component.json", "coverage": "nyc jasmine --config=tests/spec/coverage.json", "e2e-tests": "jasmine tests/spec/create.spec.js", "objc-tests": "npm run objc-tests-lib && npm run objc-tests-framework", diff --git a/tests/spec/component.json b/tests/spec/component.json deleted file mode 100644 index d8a708a..0000000 --- a/tests/spec/component.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "spec_dir": "tests/spec", - "spec_files": [ - "component/**/*[sS]pec.js" - ], - "stopSpecOnExpectationFailure": false, - "random": false -} diff --git a/tests/spec/component/versions.spec.js b/tests/spec/component/versions.spec.js deleted file mode 100644 index ed9b729..0000000 --- a/tests/spec/component/versions.spec.js +++ /dev/null @@ -1,59 +0,0 @@ -/** - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -const rewire = require('rewire'); -const versions = rewire('../../../bin/templates/scripts/cordova/lib/versions'); - -// These tests can not run on windows. -if (process.platform === 'darwin') { - describe('versions', () => { - describe('get_tool_version method', () => { - it('should not have found tool by name.', () => { - return versions.get_tool_version('unknown').then( - () => fail('expected promise rejection'), - error => expect(error.message).toContain('is not valid tool name') - ); - }, 10000); - - it('should find xcodebuild version.', () => { - return versions.get_tool_version('xcodebuild').then((version) => { - expect(version).not.toBe(undefined); - }); - }, 10000); - - it('should find ios-sim version.', () => { - return versions.get_tool_version('ios-sim').then((version) => { - expect(version).not.toBe(undefined); - }); - }, 10000); - - it('should find ios-deploy version.', () => { - return versions.get_tool_version('ios-deploy').then((version) => { - expect(version).not.toBe(undefined); - }); - }, 10000); - - it('should find pod version.', () => { - return versions.get_tool_version('pod').then((version) => { - expect(version).not.toBe(undefined); - }); - }, 20000); // The first invocation of `pod` can be quite slow - }); - }); -} diff --git a/tests/spec/coverage.json b/tests/spec/coverage.json index f709b70..43b90e6 100644 --- a/tests/spec/coverage.json +++ b/tests/spec/coverage.json @@ -2,7 +2,6 @@ "spec_dir": "tests/spec", "spec_files": [ "unit/**/*[sS]pec.js", - "component/**/*[sS]pec.js", "create.spec.js" ], "stopSpecOnExpectationFailure": false, diff --git a/tests/spec/unit/versions.spec.js b/tests/spec/unit/versions.spec.js index 86162c5..58ecd1f 100644 --- a/tests/spec/unit/versions.spec.js +++ b/tests/spec/unit/versions.spec.js @@ -38,6 +38,39 @@ if (process.platform === 'darwin') { }); }); }); + + describe('get_tool_version method', () => { + it('should not have found tool by name.', () => { + return versions.get_tool_version('unknown').then( + () => fail('expected promise rejection'), + error => expect(error.message).toContain('is not valid tool name') + ); + }, 10000); + + it('should find xcodebuild version.', () => { + return versions.get_tool_version('xcodebuild').then((version) => { + expect(version).not.toBe(undefined); + }); + }, 10000); + + it('should find ios-sim version.', () => { + return versions.get_tool_version('ios-sim').then((version) => { + expect(version).not.toBe(undefined); + }); + }, 10000); + + it('should find ios-deploy version.', () => { + return versions.get_tool_version('ios-deploy').then((version) => { + expect(version).not.toBe(undefined); + }); + }, 10000); + + it('should find pod version.', () => { + return versions.get_tool_version('pod').then((version) => { + expect(version).not.toBe(undefined); + }); + }, 20000); // The first invocation of `pod` can be quite slow + }); }); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org