<commit_before>import test from 'ava';
import request from 'supertest';
import express from 'express';

let app;

test.before('Setup', () => {
  app = express();

  require('../util/full-req-handler')(app);
});

test.cb('Origin', t => {
  request(app)
    .get('/origin')
    .expect(200, '')
    .end(t.end);
});

test.cb('Origin hostname', t => {
  request(app)
    .get('/origin-hostname')
    .expect(200, '')
    .end(t.end);
});

test.cb('Target', t => {
  request(app)
    .get('/target')
    .expect(500, 'URL missing. Usage: /?url=http://some-address')
    .end(t.end);
});

<commit_msg>fix req-not-set test<commit_after>import test from 'ava';
import request from 'supertest';

let app;

test.before('Setup', () => {
  app = require('../../server/extend-express')();

  require('../util/full-req-handler')(app);
});

test.cb('Origin', t => {
  request(app)
    .get('/origin')
    .expect(200, '')
    .end(t.end);
});

test.cb('Origin hostname', t => {
  request(app)
    .get('/origin-hostname')
    .expect(200, '')
    .end(t.end);
});

test.cb('Target', t => {
  request(app)
    .get('/target')
    .expect(500, 'URL missing. Usage: /?url=http://some-address')
    .end(t.end);
});


{'fraction_non_alphanumeric': 0.24770642201834864, 'fraction_numerical': 0.015012510425354461, 'mean_word_length': 3.1237113402061856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '1847801', 'n_tokens_mistral': 462, 'n_tokens_neox': 446, 'n_words': 80}