Javascript Tests for TextComplete plugin

In a recent project I needed a auto complete plugin that worked in a textarea, and only based on certain keywords / context. What I found was the jQuery TextComplete plugin, which is awesome! I recommend others try it out.

What I did not find was automated JavaScript tests for the auto complete behavior. Since my use case was pretty complicated (involving multiple strategies and complex regular expressions), I wanted to be sure I had tests for all the scenarios I wanted to cover.

Using Jasmine + PhantomJS, I got the tests down to the following succinct structure: