Skip to content
A cli tool that watches a directory and auto-generates a matching test file for selected file types
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
dist refactor watcherInit Jul 17, 2019
src
typings/create-file
.ctirc handle file rename Jul 3, 2019
.gitignore
.npmignore
README.md readme fixes Jul 3, 2019
jest.config.js
package.json
tsconfig.json
tslint.json
yarn.lock

README.md

Auto Test File

  • Auto-generate test files in a watched directory for matching extensions.
  • Ask for test specs and insert into the generated test.
  • Ignores index and dot files.

atf-demo

Getting Started

Installing

  • npm install auto-test-file
  • This will provide access to the atf command which can be used to start the file watcher.

Running the watcher

  • Add a watcher script to your package.json file, eg "atf": "atf -d 'src' -e 'ts' 'tsx'"
  • Run the script, which will launch the watcher.
  • Files will be auto-generated while the script is running.
  • Index files and dot files are ignored.

Config Options

--directory/ -d: name of directory to be watched eg 'src'.

--extensions / -e: extensions for which to create test files eg 'js' 'jsx'.

--noSpecInput: do not ask for specs on add of a file.

License

MIT © Anders Ramsay

You can’t perform that action at this time.