<commit_before>var pollinate = require('../lib/index.js')
var assert = require('chai').assert
var rimraf = require('rimraf')

describe('Test basic example', function () {
    it('GitHub with json string', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "codingcoop/webapp",
                "{\"name\":\"newproject\",\"container\":\"alpine\"}"
            ],
            "options": {
                //..
            }},
            function(result) {
                assert.isObject(result);
                rimraf('newproject', done)
            })
    })
    it('GitHub with json file', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "codingcoop/webapp",
                "tests/data.json"
            ],
            "options": {
                //..
            }},
            function(result) {
                assert.isObject(result);
                rimraf('newproject', done)
            })
    })
    it('GitHub with json url', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "codingcoop/webapp",
                "https://raw.githubusercontent.com/codingcoop/pollinate/master/tests/data.json"
            ],
            "options": {
                //..
            }},
            function(result) {
                assert.isObject(result);
                rimraf('newproject', done)
            })
    })
    it('Git with json string', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "https://github.com/codingcoop/webapp.git",
                "{\"name\":\"newproject\",\"container\":\"alpine\"}"
            ],
            "options": {
                //..
            }},
            function(result) {
                assert.isObject(result);
                rimraf('newproject', done)
            })
    })
    it('GitHub with options only', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "codingcoop/webapp"
            ],
            "options": {
               "name": "test",
               "container": "ubuntu"
            }},
            function(result) {
                assert.isObject(result);
                rimraf('test', done)
            })
    })
    it('Local path with json string', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "./tests/template",
                "{\"name\":\"newproject\",\"container\":\"alpine\"}"
            ],
            "options": {
                //..
            }},
            function(result) {
                assert.isObject(result);
                rimraf('newproject', done)
            })
    })
    it('Local path with json file', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "./tests/template",
                "tests/data.json"
            ],
            "options": {
                //..
            }},
            function(result) {
                assert.isObject(result);
                rimraf('newproject', done)
            })
    })
    it('Local path with json url', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "./tests/template",
                "https://raw.githubusercontent.com/codingcoop/pollinate/master/tests/data.json"
            ],
            "options": {<commit_msg>Using develop branch in tests.<commit_after>var pollinate = require('../lib/index.js')
var assert = require('chai').assert
var rimraf = require('rimraf')

describe('Test basic example', function () {
    it('GitHub with json string', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "codingcoop/webapp",
                "{\"name\":\"newproject\",\"container\":\"alpine\"}"
            ],
            "options": {
                //..
            }},
            function(result) {
                assert.isObject(result);
                rimraf('newproject', done)
            })
    })
    it('GitHub with json file', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "codingcoop/webapp",
                "tests/data.json"
            ],
            "options": {
                //..
            }},
            function(result) {
                assert.isObject(result);
                rimraf('newproject', done)
            })
    })
    it('GitHub with json url', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "codingcoop/webapp",
                "https://raw.githubusercontent.com/codingcoop/pollinate/develop/tests/data.json"
            ],
            "options": {
                //..
            }},
            function(result) {
                assert.isObject(result);
                rimraf('newproject', done)
            })
    })
    it('Git with json string', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "https://github.com/codingcoop/webapp.git",
                "{\"name\":\"newproject\",\"container\":\"alpine\"}"
            ],
            "options": {
                //..
            }},
            function(result) {
                assert.isObject(result);
                rimraf('newproject', done)
            })
    })
    it('GitHub with options only', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "codingcoop/webapp"
            ],
            "options": {
               "name": "test",
               "container": "ubuntu"
            }},
            function(result) {
                assert.isObject(result);
                rimraf('test', done)
            })
    })
    it('Local path with json string', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "./tests/template",
                "{\"name\":\"newproject\",\"container\":\"alpine\"}"
            ],
            "options": {
                //..
            }},
            function(result) {
                assert.isObject(result);
                rimraf('newproject', done)
            })
    })
    it('Local path with json file', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "./tests/template",
                "tests/data.json"
            ],
            "options": {
                //..
            }},
            function(result) {
                assert.isObject(result);
                rimraf('newproject', done)
            })
    })
    it('Local path with json url', function (done) {
        this.timeout(10000)
        pollinate({
            "inputs": [
                "./tests/template",
                "https://raw.githubusercontent.com/codingcoop/pollinate/develop/tests/data.json"
            ],
            "options": {
{'fraction_non_alphanumeric': 0.147129355339258, 'fraction_numerical': 0.011285089575398505, 'mean_word_length': 1.1523982999392834, 'pattern_counts': {'":': 48, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3339317', 'n_tokens_mistral': 1967, 'n_tokens_neox': 1796, 'n_words': 290}