fully remove the wrapper specs, why not
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/91eef6fe Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/91eef6fe Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/91eef6fe Branch: refs/heads/no-lazy-load Commit: 91eef6fe51ecc3d0fded7333f8f445d8cc9b05c8 Parents: 199928f Author: filmaj <maj....@gmail.com> Authored: Thu Jun 8 18:37:42 2017 -0500 Committer: filmaj <maj....@gmail.com> Committed: Fri Jun 9 08:58:47 2017 -0500 ---------------------------------------------------------------------- spec-cordova/wrappers.spec.js | 61 ------------------------------------- spec-plugman/wrappers.spec.js | 62 -------------------------------------- 2 files changed, 123 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/91eef6fe/spec-cordova/wrappers.spec.js ---------------------------------------------------------------------- diff --git a/spec-cordova/wrappers.spec.js b/spec-cordova/wrappers.spec.js deleted file mode 100644 index 35c6c2e..0000000 --- a/spec-cordova/wrappers.spec.js +++ /dev/null @@ -1,61 +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. -*/ - -/* jshint loopfunc: true */ - -var Q = require('q'), - cordova = require('../src/cordova/cordova'); - -// TODO: remove this file, and instead add unit tests for addModuleProperty to spec-cordova/util.spec.js -xdescribe('callback wrapper', function() { - var calls = ['prepare', 'build', 'create', 'emulate', 'plugin', 'platform', 'compile', 'run']; - for (var i = 0; i < calls.length; i++) { - var call = calls[i]; - - describe('`' + call + '`', function() { - var raw; - beforeEach(function() { - raw = spyOn(cordova.raw, call); - }); - - it('Test 001 : should work with no callback and success', function() { - raw.and.returnValue(Q()); - cordova[call](); - expect(raw).toHaveBeenCalled(); - }); - - it('Test 002 : should call the callback on success', function(done) { - raw.and.returnValue(Q()); - cordova[call](function(err) { - expect(err).toBeUndefined(); - done(); - }); - }); - - it('Test 003 : should call the callback with the error on failure', function(done) { - var err = new Error('junk'); - raw.and.returnValue(Q.reject(err)); - cordova[call](function(e) { - expect(e).toEqual(err); - done(); - }); - }); - }); - } -}); http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/91eef6fe/spec-plugman/wrappers.spec.js ---------------------------------------------------------------------- diff --git a/spec-plugman/wrappers.spec.js b/spec-plugman/wrappers.spec.js deleted file mode 100644 index d7904a1..0000000 --- a/spec-plugman/wrappers.spec.js +++ /dev/null @@ -1,62 +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. -*/ - -/* jshint loopfunc:true */ - -var Q = require('q'), - plugman = require('../src/plugman/plugman'); - -// TODO: instead, test the addPropertyMethod of src/plugman/plugman -xdescribe('callback wrapper', function() { - var calls = ['install', 'uninstall', 'fetch', 'config', 'owner', 'adduser', 'publish', 'unpublish', 'search', 'info', 'create', 'platform']; - for (var i = 0; i < calls.length; i++) { - var call = calls[i]; - - describe('`' + call + '`', function() { - var raw; - beforeEach(function() { - raw = spyOn(plugman.raw, call); - }); - - it('Test 001 : should work with no callback and success', function() { - raw.and.returnValue(Q()); - plugman[call](); - expect(raw).toHaveBeenCalled(); - }); - - it('Test 002 : should call the callback on success', function(done) { - raw.and.returnValue(Q(1)); - plugman[call](function(err) { - expect(err).toBeUndefined(); - done(); - }); - }); - - it('Test 003 : should call the callback with the error on failure', function(done) { - var err = new Error('junk'); - raw.and.callFake(function() { return Q.reject(err); }); - plugman[call](function(err) { - expect(err).toEqual(err); - done(); - }); - }); - }); - } -}); - --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org