// Instructions:
// Install dependencies: npm install
// Compile the example with esbuild: node build.js
// Run the compiled example: node dist/example.js

/* IMPORT */

import {id, sum} from './example.worker';
import process from 'node:process';

/* MAIN */

const test = async (): Promise<void> => {

  console.assert ( await sum ( 10, 5 ) === 15 );

  const ids = await Promise.all ([ id (), id (), id () ]);

  console.log ( 'IDs:', ids );

  process.exit ();

};

/* RUN */

test ();