Skip to content

A simple utility to sniff out files that include js tests and generates a `requirejs` file for use in karma configuration.

Notifications You must be signed in to change notification settings

lawrencec/test-cat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

test-cat Build Status Code Climate Test Coverage Latest Release

A simple utility to sniff out files that include js tests and generates a requirejs file for use in karma configuration. TestCat because it hunts and leaves you a little surprise with what it finds.

Given a directory tree like so:

  test
    - subdir
      - nestedTest
        - nestedTest.js
      test.js

It will generate a file in your chosen location that looks like this:

'use strict';
define
  (
    [
      "test/subdir/nestedTest/nestedTest",
      "test/test"
    ]
  );

Install

npm install test-cat --save-dev

Usage

test-cat find --test-dir test --output ./specs.js --framework mocha --dry-run
Usage: test-cat [options]

Options:
  --test-dir, -t   Directory to search              [required] [default: "test"]
  --output, -o     Output file                                        [required]
  --framework, -f  Testing framework to search for [required] [default: "mocha"]
  --root-dir, -k   sub directory to use as root dir in output
  --sort, -s       Sort test files                               [default: true]
  --randomize, -r  Randomize test files                         [default: false]
  --dry-run, -d    Performs a dry run; does not output file     [default: false]
  --quiet, -q      Does not output any text                     [default: false]
  --help, -h       Show help                                           [boolean]

About

A simple utility to sniff out files that include js tests and generates a `requirejs` file for use in karma configuration.

Resources

Stars

Watchers

Forks

Packages

No packages published