0.0.15 • Published 4 years ago
@asdgf/cli v0.0.15
@asdgf/cli
A stupid simple way to test
No magic, no nonsense.
Usage
asdgfConfiguration
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.jsConfig 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');
}
};
}