<commit_before>var chai = require('chai')
var server = require('../../app')
var expect = chai.expect
var nock = require('nock')
/* eslint-disable no-unused-vars */
var should = chai.should()

describe('Auth logged out', function () {
  it('login page loads correctly', function (done) {
    chai.request(server)
      .get('/auth/login')
      .end(function (err, res) {
        should.not.exist(err)
        res.should.have.status(200)
        done()
      })
  })

  it('Account page logged out redirects', (done) => {
    chai.request(server)
      .get('/auth/account').end(function (err, res) {
        should.not.exist(err)
        expect(res.redirects[0]).to.match(/\/auth\/login/)
        expect(res).to.redirect
        done()
      })
  })

  it('google endpoint redirects', function (done) {
    chai.request(server)
      .get('/auth/google')
      .end(function (err, res) {
        if (err) console.log(err.stack)
        expect(res.redirects[0]).to.contain('https://accounts.google.com/o/oauth2/auth')
        expect(res).to.redirect
        done()
      })
  })

  it('it should end the session and show login', function (done) {
    chai.request(server)
      .get('/auth/logout')
      .end(function (err, res) {
        should.not.exist(err)
        expect(res.redirects[0]).to.match(/\/$/)
        expect(res).to.redirect<commit_msg>Fixed test not to use console.log<commit_after>var chai = require('chai')
var server = require('../../app')
var expect = chai.expect
var nock = require('nock')
/* eslint-disable no-unused-vars */
var should = chai.should()

describe('Auth logged out', function () {
  it('login page loads correctly', function (done) {
    chai.request(server)
      .get('/auth/login')
      .end(function (err, res) {
        should.not.exist(err)
        res.should.have.status(200)
        done()
      })
  })

  it('Account page logged out redirects', (done) => {
    chai.request(server)
      .get('/auth/account').end(function (err, res) {
        should.not.exist(err)
        expect(res.redirects[0]).to.match(/\/auth\/login/)
        expect(res).to.redirect
        done()
      })
  })

  it('google endpoint redirects', function (done) {
    chai.request(server)
      .get('/auth/google')
      .end(function (err, res) {
        should.exist(err)
        expect(res.redirects[0]).to.contain('https://accounts.google.com/o/oauth2/auth')
        expect(res).to.redirect
        done()
      })
  })

  it('it should end the session and show login', function (done) {
    chai.request(server)
      .get('/auth/logout')
      .end(function (err, res) {
        should.not.exist(err)
        expect(res.redirects[0]).to.match(/\/$/)
        expect(res).to.redirect
{'fraction_non_alphanumeric': 0.17551622418879056, 'fraction_numerical': 0.005162241887905605, 'mean_word_length': 2.4782051282051283, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '206419', 'n_tokens_mistral': 896, 'n_tokens_neox': 885, 'n_words': 168}