'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 _Plugin = require('../../src/agent/Plugin');

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

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

(0, _mocha.describe)('Executor', function () {
    var executor = void 0;
    (0, _mocha.beforeEach)(function () {
        var eventData = JSON.parse(_fs2.default.readFileSync(__dirname + '/../fixtures/githubEventPayload.json', 'utf-8'));
        executor = new _Executor.Executor(eventData, console);
    });

    (0, _mocha.describe)('constructor', function () {
        (0, _mocha.it)('should instantiate as Plugin', function () {
            _assert2.default.equal(executor instanceof _Plugin.Plugin, true);
        });
    });

    (0, _mocha.describe)('getOptions', function () {
        (0, _mocha.it)('should return environment', function () {
            _assert2.default.equal(executor.getOptions(), process.env);
        });
    });
});