atom-spec-finder

Shortcut for atom editor to switch between the file and its spec

rogeriochaves

326

0

2.1.1

MIT

GitHub

Spec Finder

atom-spec-finder-in-action

Spec Finder is a language-agnostic plugin for atom that lets you quickly jump between your source and spec files, by simple pressing Ctrl+. on atom editor.

It is based on the homonymous plugin for Sublime Text 2.

How does it work? How does it find my specs?

The plugin gets your current filename, like foo.js, and adds the regex /.?(spec|test)\./i to it's end, so, it will try to match with files like this:

And so on. When you are on the test, the process is the oposite. Underneath it uses the fs-finder to find files by regex.

TODO

By default it ignores the folders /.git, /node_modules and /dist, but it would be much better if it just read the .gitignore file and ignores files listed there.

I'd also like to add the search regex as a config instead of hardcoded.