forked from mirrors/probot
Move test helper to block where it is used
This commit is contained in:
parent
93ff9f99c5
commit
0a44d52191
|
@ -3,12 +3,6 @@ const path = require('path');
|
||||||
const expect = require('expect');
|
const expect = require('expect');
|
||||||
const Context = require('../lib/context');
|
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 () {
|
describe('Context', function () {
|
||||||
let event;
|
let event;
|
||||||
let context;
|
let context;
|
||||||
|
@ -79,6 +73,12 @@ describe('Context', function () {
|
||||||
describe('config', function () {
|
describe('config', function () {
|
||||||
let github;
|
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 () {
|
beforeEach(function () {
|
||||||
github = {
|
github = {
|
||||||
repos: {
|
repos: {
|
||||||
|
|
Loading…
Reference in New Issue