cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From audreyso <...@git.apache.org>
Subject [GitHub] cordova-lib pull request #569: CB-12361: added main function unit tests for ...
Date Fri, 25 Aug 2017 17:12:57 GMT
Github user audreyso commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/569#discussion_r135308470
  
    --- Diff: spec/cordova/plugin/add.spec.js ---
    @@ -21,16 +21,82 @@
     /* globals fail */
     
     var Q = require('q');
    -var add = require('../../../src/cordova/plugin/add');
    +var rewire = require('rewire');
    +var add = rewire('../../../src/cordova/plugin/add');
    +var plugman = require('../../../src/plugman/plugman');
    +var cordova_util = require('../../../src/cordova/util');
    +var path = require('path');
    +var fs = require('fs');
    +var config = require('../../../src/cordova/config');
    +var events = require('cordova-common').events;
    +var registry = require('../../../src/plugman/registry/registry');
    +var plugin_util = require('../../../src/cordova/plugin/util');
     
    -describe('cordova/plugin/add', function () {
    +fdescribe('cordova/plugin/add', function () {
         var projectRoot = '/some/path';
         var hook_mock;
    +    var Cfg_parser_mock = function () {};
    +    var cfg_parser_revert_mock;
    +    var plugin_info_provider_mock = function () {};
    +    var plugin_info_provider_revert_mock;
    +    var plugin_info;
    +    var package_json_mock;
    +
         beforeEach(function () {
             hook_mock = jasmine.createSpyObj('hooks runner mock', ['fire']);
             hook_mock.fire.and.returnValue(Q());
    +        Cfg_parser_mock.prototype = jasmine.createSpyObj('config parser prototype mock',
['getPlugin', 'removePlugin', 'addPlugin', 'write']);
    +        /* eslint-disable */
    +        Cfg_parser_mock.prototype.getPlugin;
    +        Cfg_parser_mock.prototype.getPlugin;
    --- End diff --
    
    Hi! I think you have "getPlugin" twice?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message