How to set up a dev environment for Jasmine?

I have a plugin that I want to write. I’m going to test-drive it with Jasmine. This leads to a few questions regarding the setup of a dev environment.

  1. How do you run your specs? I see they run in a version of Webkit/Safari, but what dependencies are there?
  2. Which module/require implementation do you expect/use?
  3. Or are you using node.js in some way (since you’re using package.json)?

I’m happy to document this - a README for the plugins repo - as I figure it out.


Hi. I run my specs (when I’m developing) pretty much the same way that they are run within the app when you choose Help > Software Development Kit > Run Specs. The only difference being that I don’t run them directly in the FoldingText app… instead I have a we browser pointed at the specs html file and it reloads anytime I change a file.

FoldingText uses requirejs for modules.

I use node for various dev tasks, but it’s not being used in the FoldingText app runtime. That’s all just running in a WebView and bridged to native for things like file access.

If you are doing a plugin probably best place to start is look at examples in:

Most of them have specs that you can use a starting points.