Chazmine - a Vim Plugin for Jasmine-to-Chai Conversions

We’re converting our JavaScript tests from Jasmine to Chai.

object = {}

# a simple Jasmine assertion
expect(object).toBe object

# the equivalent Chai assertion
expect(object).to.equal object

But converting assertions for ~2k specs is a bummer.

bummer

So I created Chazmine. It’s a Vim plugin that substitutes Jasmine assertions with Chai assertions. Install the Chazmine plugin, run the :Chaz command, and boom - your test file is Chai’d.

We’re adding new Jasmine-to-Chai substitutions to Chazmine as we need them. If you find a Jasmine-to-Chai substitution that’s not included there, or want to add something awesome, feel free to contribute.