<commit_before>'use strict';

require('dotenv').config({path: `${__dirname}/../.test.env`});

const expect = require('expect');
const server = require('../lib/server.js');
const superagent = require('superagent');

const API_URL = process.env.API_URL;

describe('testing server', () => {
  before(server.start);
  after(server.stop);

  describe('testing server', () => {
    it('should return 404 for non-existent route', () => {
      return superagent.get(`${API_URL}/api/not-a-route`)
        .then(res => {throw res;})
        .catch(res => {
          console.log('res.body', res.body);
          expect(res.status).toEqual(404);
        });
    });
  });
});<commit_msg>server test passing<commit_after>'use strict';

require('dotenv').config({path: `${__dirname}/../.test.env`});

const expect = require('expect');
const server = require('../lib/server.js');
const superagent = require('superagent');

const API_URL = process.env.API_URL;

describe('testing server', () => {
  before(server.start);
  after(server.stop);

  describe('testing server', () => {
    it('should return 404 for non-existent route', () => {
      return superagent.get(`${API_URL}/api/not-a-route`)
        .then(res => {throw res;})
        .catch(res => {
          console.log('res.body', res.body);
          console.log('res.status', res.status);
          expect(res.status).toEqual(404);
        });
    });
  });
});
{'fraction_non_alphanumeric': 0.21078779276082327, 'fraction_numerical': 0.008516678495386799, 'mean_word_length': 3.272727272727273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '6570575', 'n_tokens_mistral': 453, 'n_tokens_neox': 440, 'n_words': 78}