'use strict';

require('source-map-support/register');

var _fs = require('fs');

var _fs2 = _interopRequireDefault(_fs);

var _mocha = require('mocha');

var _assert = require('assert');

var _assert2 = _interopRequireDefault(_assert);

var _Executor = require('../../src/agent/Executor');

var _ExecutorTravis = require('../../src/executors/ExecutorTravis');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

(0, _mocha.describe)('ExecutorTravis', function () {
    var executorTravis = void 0;
    var eventData = void 0;

    (0, _mocha.beforeEach)(function () {
        eventData = JSON.parse(_fs2.default.readFileSync(__dirname + '/../fixtures/executorJenkinsTaskPayload.json', 'utf-8'));
        executorTravis = new _ExecutorTravis.ExecutorTravis(eventData, console);
    });

    (0, _mocha.describe)('constructor', function () {
        (0, _mocha.it)('should instantiate as Executor', function () {
            _assert2.default.equal(executorTravis instanceof _Executor.Executor, true);
        });
    });

    /*describe('executeTask', () => {
        eventData = JSON.parse(fs.readFileSync(__dirname + '/../fixtures/executorJenkinsTaskPayload.json', 'utf-8'));
        let expectedObject = { passed: true, url: 'https://travis-ci.org' };
        it('executeTask to return result object', async () => {
            let result = await executorTravis.executeTask(eventData.ghTaskConfig.tasks);
            for (let i = 0; i < 2; i++) {
                assert.equal(result[i], expectedObject[i]);
            }
        });
    });*/
});