<commit_before>ipso     = require 'ipso'
{server} = require '../../lib/api/server'

describe 'server', -> 

    it 'uses config.api', (done) -> 

        config = {}
        Object.defineProperty config, 'api', get: -> done()
        server config

    it 'starts http listening at config.api.port', ipso (facto, http) -> 

        http.does createServer: ->
            listen: (port) -> 
                port.should.equal 2999
                facto()

        server api: port: process.env.API_PORT
<commit_msg>temporary test to check failure to call "active stub"<commit_after>ipso     = require 'ipso'
{server} = require '../../lib/api/server'

describe 'server', -> 

    it 'uses config.api', (done) -> 

        config = {}
        Object.defineProperty config, 'api', get: -> done()
        server config

    it 'starts http listening at config.api.port', ipso (facto, http) -> 

        http.does createServer: ->
            listen: (port) -> 
                port.should.equal 2999
                facto()

        server api: port: process.env.API_PORT


    it 'temporary test to check failure to call "active stub"', ipso (facto, should) -> 

        should.does exist: -> facto()


{'fraction_non_alphanumeric': 0.13533834586466165, 'fraction_numerical': 0.006683375104427736, 'mean_word_length': 1.9580246913580246, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '331238', 'n_tokens_mistral': 374, 'n_tokens_neox': 339, 'n_words': 104}