<commit_before>var request = require('supertest');
var assert = require('assert');

var Habitat = require('habitat');
var testEnv = new Habitat();

var badgeClient = require('../src/badgeClient.js')(testEnv);
var badgeService = require('../src/badgeService.js')(badgeClient, testEnv);
var app = require('../src/app.js')(badgeService);

function before() {
  // without this function declare, jshint report error
}

describe('Intergration test against the real Badge server', function () {
  before(function () {
    assert.ok(testEnv.get('BADGES_ENDPOINT'), 'should set up BADGES_ENDPOINT in your test environment');
    assert.ok(testEnv.get('BADGES_KEY'), 'should set up BADGES_KEY in your test environment');
    assert.ok(testEnv.get('BADGES_SECRET'), 'should set up BADGES_SECRET in your test environment');
    assert.ok(testEnv.get('BADGES_SYSTEM'), 'should set up BADGES_SYSTEM in your test environment');
  });

  it('get all the badges', function (done) {
    request(app)
      .get('/badges')<commit_msg>#26 push Travis to build ...<commit_after>var request = require('supertest');
var assert = require('assert');

var Habitat = require('habitat');
var testEnv = new Habitat();

var badgeClient = require('../src/badgeClient.js')(testEnv);
var badgeService = require('../src/badgeService.js')(badgeClient, testEnv);
var app = require('../src/app.js')(badgeService);

function before() {
  // without this function declare, jshint report error about before not defined ...
}

describe('Intergration test against the real Badge server', function () {
  before(function () {
    assert.ok(testEnv.get('BADGES_ENDPOINT'), 'should set up BADGES_ENDPOINT in your test environment');
    assert.ok(testEnv.get('BADGES_KEY'), 'should set up BADGES_KEY in your test environment');
    assert.ok(testEnv.get('BADGES_SECRET'), 'should set up BADGES_SECRET in your test environment');
    assert.ok(testEnv.get('BADGES_SYSTEM'), 'should set up BADGES_SYSTEM in your test environment');
  });

  it('get all the badges', function (done) {
    request(app)
      .get('/badges')
{'fraction_non_alphanumeric': 0.14691714836223507, 'fraction_numerical': 0.0009633911368015414, 'mean_word_length': 4.951289398280802, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '5671218', 'n_tokens_mistral': 660, 'n_tokens_neox': 649, 'n_words': 178}