Move test helper to block where it is used

This commit is contained in:
Brandon Keepers 2017-07-27 10:48:45 -05:00
parent 93ff9f99c5
commit 0a44d52191
No known key found for this signature in database
GPG Key ID: F9533396D5FACBF6
1 changed files with 6 additions and 6 deletions

View File

@ -3,12 +3,6 @@ const path = require('path');
const expect = require('expect');
const Context = require('../lib/context');
function readConfig(fileName) {
const configPath = path.join(__dirname, 'fixtures', 'config', fileName);
const content = fs.readFileSync(configPath, {encoding: 'utf8'});
return {data: {content: Buffer.from(content).toString('base64')}};
}
describe('Context', function () {
let event;
let context;
@ -79,6 +73,12 @@ describe('Context', function () {
describe('config', function () {
let github;
function readConfig(fileName) {
const configPath = path.join(__dirname, 'fixtures', 'config', fileName);
const content = fs.readFileSync(configPath, {encoding: 'utf8'});
return {data: {content: Buffer.from(content).toString('base64')}};
}
beforeEach(function () {
github = {
repos: {