OscarGodson/EpicEditor — pull request #38 by johnmdonahue (2012-03-05 02:02:25+00:00)
Title: Experimental api update and test suite

RE: [Issue 24: Write some fucking tests](https://github.com/OscarGodson/EpicEditor/issues/24)

I started to add some tests using `foounit` and in doing this it seemed like a handy option to configure the localStorage name. I refactored the code to remove the `options()` method and instead allow the EpicEditor constructor to simply accept an options object that includes the target element. I also added 4 simple tests to just get things moving.

```js
var opts = {}
, editor = new EpicEditor(opts)
```

I considered trying to work with the current options method, but the localStorage is set from within the constructor and I couldn't think of an application where changing this option could be useful after initialization.

This could just as well be accomplished by `EpicEditor(el, opts)` or extracting the localStorage definition to the existing `EpicEditor.options()` method.

Let me know your thoughts on this. Didn't want to get too far before checking in.

Also what are your thought on setting up [node-jshint](https://github.com/jshint/node-jshint) for contributions?

Love the tool and looking forward to contributing however I can.

Thanks.

John

PS: Don't really know of a better way than a pull-request to share this but it's def not pull-request ready. More just a conversation starter.