<commit_before>
import test from 'ava';

const jssm = require('../../build/jssm.es5.js');





test('build-set version number is present', t => t.is(typeof jssm.version, 'string'));

const seq = upTo => new Array(upTo).fill(false).map( (_,i) => i );





function promise_delay(how_long, f) {
    return new Promise( (resolve, reject) => setTimeout( () => { resolve(f()); }, how_long ) );
}

// todo whargarbl get rid of this nonsense before 1.0
seq(3000).map(i =>
    test(`Delay test ${i}`, t => promise_delay(Math.random() * 1500, () => { t.is(1,1); return 'res'; }))
);

// p_test('text', 'expected', test());





test('Stop light', async t => {

    const light = new jssm.machine({
      initial_state: 'red',
      transitions:[
        { name:'switch_warn', from:'green',  to:'yellow' },
        { name:'switch_halt', from:'yellow', to:'red'    },
        { name:'switch_go',   from:'red',    to:'green'  }
      ]
    });

    t.is(light.states().length, 3);

});<commit_msg>remove the forced parallelism stuff<commit_after>
import test from 'ava';

const jssm = require('../../build/jssm.es5.js');





test('build-set version number is present', t => t.is(typeof jssm.version, 'string'));

const seq = upTo => new Array(upTo).fill(false).map( (_,i) => i );





test('Stop light', async t => {

    const light = new jssm.machine({
      initial_state: 'red',
      transitions:[
        { name:'switch_warn', from:'green',  to:'yellow' },
        { name:'switch_halt', from:'yellow', to:'red'    },
        { name:'switch_go',   from:'red',    to:'green'  }
      ]
    });

    t.is(light.states().length, 3);

});
{'fraction_non_alphanumeric': 0.2076167076167076, 'fraction_numerical': 0.009828009828009828, 'mean_word_length': 3.0725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, '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': '6572128', 'n_tokens_mistral': 589, 'n_tokens_neox': 551, 'n_words': 129}