1.0.1 • Published 4 years ago

@eliseevnp/mjs-test-launcher v1.0.1

Weekly downloads
84
License
ISC
Repository
-
Last release
4 years ago

Test launcher for mjs-mocha

Configuration

  • Create file, for example launcher.mjs

  • Add script to your package.json:

{
"test": "node --experimental-modules ./launcher.mjs"
}
  • All variables in config are defined by default as in example below, override them if you want.

  • launcher.mjs:

import launch from '@eliseevnp/mjs-test-launcher';

launch({
  env: {
    NODE_ENV: 'test',
    MYSQL_USER: 'root',
    MYSQL_PASSWORD: 'root',
    MYSQL_DATABASE: 'test',
    MYSQL_HOST: 'localhost'
  },
  db: false,
  dir: './src/tests',
  migrations_dir: './src/db',
  ext: ['mjs', 'js'] // all files ending with '*test.mjs' and '*test.js' will be tested
});
1.0.1

4 years ago

1.0.0

4 years ago