@asdgf/cli

0.0.15 • Public • Published

@asdgf/cli

A stupid simple way to test

No magic, no nonsense.

Usage

asdgf

Configuration

CLI

Command/option Type Description Example
--globs string[] Globs to analyze --globs "**/*.test.js"
--exclude string[] Globs to exclude --exclude "!foo.test.js"

Example:

asdgf --globs **/*.test.js

Config file

asdgf.config.js:

export default {
  globs: ['**/*.test.js'],
  exclude: ['!foo.test.js'],
  reporter: {
    /** Runs before all suites run */
    start: () => {
      console.log('start\n');
    },
    /** Runs before the suite starts, can be used for set up */
    suiteStart: ({name, only, tests}) => {
      console.log(`Starting suite: "${name}"`);
    },
    /** Runs after every ran test, whether it's skipped, passed, or failed */
    renderTest: (testResult) => {
      console.log(`  ${testResult.passed ? '✅' : '❌'} "${testResult.name}"`);
    },
    /** Runs after the entire suite has ran */
    suiteEnd: (testSuiteResult) => {
      console.log('\n')
    },
    /** Runs after all suites have ran */
    end: () => {
      console.log('end');
    }
  };
}

Package Sidebar

Install

npm i @asdgf/cli

Weekly Downloads

1

Version

0.0.15

License

ISC

Unpacked Size

6.01 kB

Total Files

8

Last publish

Collaborators

  • passle