test-cat
Searches directory for test files and renders requirejs file
Last updated 4 years ago by lawrencec .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install test-cat 
SYNC missed versions from official npm registry.

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]

Current Tags

  • 1.0.1                                ...           latest (4 years ago)

2 Versions

  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |