function tests(tests) {
  let red = '\x1b[31m';
  let green = '\x1b[32m';
  let reset = '\x1b[0m';

  let stats = [];
  for (let [name, cb] of tests) {
    let passed;
    try {
      cb();
      console.log(green + '✓ ', name, 'passed', reset);
      passed = true;
    } catch (e) {
      console.error(red + '❌', name, reset);
      console.log(e);
      passed = false;
    }
    stats.push(passed);
  }
  let passed_count = stats.filter(a => a).length;
  console.log(`${passed_count}/${tests.length} tests passed`);
  process.exit(passed_count === tests.length ? 0 : 1);
}
// poor man's replacement for jest because making jest work with webpack+wasm is problematic
poor man's replacement for jest because making jest work with webpack+wasm is problematic
poor man ' s replacement for jest because making jest work with webpack + wasm is problematic
function tests(tests) {
  let red = '\x1b[31m';
  let green = '\x1b[32m';
  let reset = '\x1b[0m';
  let stats = [];
  for (let [name, cb] of tests) {
    let passed;
    try {
      cb();
      console.log(green + '✓ ', name, 'passed', reset);
      passed = true;
    } catch (e) {
      console.error(red + '❌', name, reset);
      console.log(e);
      passed = false;
    }
    stats.push(passed);
  }
  let passed_count = stats.filter(a => a).length;
  console.log(`${passed_count}/${tests.length} tests passed`);
  process.exit(passed_count === tests.length ? 0 : 1);
}
function tests ( tests ) { let red = '\x1b[31m' ; let green = '\x1b[32m' ; let reset = '\x1b[0m' ; let stats = [ ] ; for ( let [ name , cb ] of tests ) { let passed ; try { cb ( ) ; console . log ( green + '✓ ',  n me,  ' assed',  r set); passed = true ; } catch ( e ) { console . error ( red + '❌',  n me,  r set); console . log ( e ) ; passed = false ; } stats . push ( passed ) ; } let passed_count = stats . filter ( a => a ) . length ; console . log ( ` ${ passed_count } ${ tests . length } ` ) ; process . exit ( passed_count === tests . length ? 0 : 1 ) ; }
poor man's replacement for jest because making jest work with webpack+wasm is problematic
poor man ' s replacement for jest because making jest work with webpack + wasm is problematic