cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-12361) Speed up cordova-lib tests
Date Fri, 25 Aug 2017 17:13:00 GMT

    [ https://issues.apache.org/jira/browse/CB-12361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16141905#comment-16141905
] 

ASF GitHub Bot commented on CB-12361:
-------------------------------------

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?


> Speed up cordova-lib tests
> --------------------------
>
>                 Key: CB-12361
>                 URL: https://issues.apache.org/jira/browse/CB-12361
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-lib
>            Reporter: Steve Gill
>            Assignee: Steve Gill
>              Labels: cordova-next
>
> * Split out e2e tests into own folder
> * stub i/o and network requests
> * use local fixtures when possible & makes sense



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message