Github user stevengill commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/499#discussion_r84999589
  
    --- Diff: cordova-lib/spec-cordova/package.json.spec.js ---
    @@ -0,0 +1,389 @@
    +/**
    +    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.
    +*/
    +var helpers = require('./helpers'),
    +    path = require('path'),
    +    fs = require('fs'),
    +    shell = require('shelljs'),
    +    superspawn = require('cordova-common').superspawn,
    +    Q = require('q'),
    +    events = require('cordova-common').events,
    +    cordova = require('../src/cordova/cordova'),
    +    rewire = require('rewire'),
    +    prepare = require('../src/cordova/prepare'),
    +    platforms = require('../src/platforms/platforms'),
    +    platform = rewire('../src/cordova/platform.js');
    +
    +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker';
    +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins');
    +
    +function addPlugin(target, id, options) {
    +    // Checks that there are no plugins yet.
    +    return cordova.raw.plugin('list').then(function() {
    +        expect(results).toMatch(/No plugins added/gi);
    +    }).then(function() {
    +        // Adds a fake plugin from fixtures.
    +        return cordova.raw.plugin('add', target, options);
    +    }).then(function() {
    +        expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist();
    +    }).then(function() {
    +        return cordova.raw.plugin('ls');
    +    }).then(function() {
    +        expect(results).toContain(id);
    +    });
    +}
    +// Runs: remove, list.
    +function removePlugin(id, options) {
    +    return cordova.raw.plugin('rm', id)
    +    .then(function() {
    +        // The whole dir should be gone.
    +        expect(path.join(project, 'plugins', id)).not.toExist();
    +    }).then(function() {
    +        return cordova.raw.plugin('ls');
    +    }).then(function() {
    +        expect(results).toMatch(/No plugins added/gi);
    +    });
    +}
    +// Checks if plugin list is empty.
    +function emptyPluginList() {
    --- End diff --
    
    Delete emptyPluginList and fullPluginList since you aren't using them


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to