Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make tests pass jshint

  • Loading branch information...
commit 844fb985570d951199effbdc80f37057fac6051d 1 parent 858425d
@johnmdonahue johnmdonahue authored
View
6 .jshintignore
@@ -0,0 +1,6 @@
+node_modules
+packages
+.git
+
+test/mocha.js
+test/expect.js
View
14 .jshintrc
@@ -66,20 +66,16 @@
, "complete"
, "fail"
, "namespace"
- // Foounit
- , "foounit"
+ // Mocha
+ , "mocha"
, "describe"
, "expect"
, "before"
+ , "beforeEach"
+ , "after"
+ , "afterEach"
, "it"
, "be"
- , "beNull"
- , "beTrue"
- , "beFalse"
- , "beUndefined"
- , "after"
- , "beTruthy"
- , "beFalsy"
, "throwError"
, "match"
]
View
4 test/helpers.js
@@ -12,7 +12,9 @@ function createContainer(id) {
function removeContainer(id) {
var el = document.getElementById(id);
- el && (el.parentNode.removeChild(el));
+ if (el) {
+ el.parentNode.removeChild(el);
+ }
}
function getContainer(id) {
View
2  test/test.edit.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.edit()', function () {
var testEl
, id
View
2  test/test.emit.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.emit([event])', function () {
var testEl
, id
View
2  test/test.enterFullscreen.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.enterFullscreen()', function () {
var testEl
, id
View
2  test/test.exitFullscreen.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.exitFullscreen()', function () {
var testEl
, id
View
4 test/test.exportFile.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.exportFile([fileName], [type])', function () {
var testEl
, id
@@ -39,7 +41,7 @@ describe('.exportFile([fileName], [type])', function () {
});
it('should be able to open non-currently open files', function () {
- var exportFileTest = 'exportFileTest' + id;
+ var exportFileTest = 'exportFileTest' + id;
editor.importFile(exportFileTest, 'hello world'); // import and open a file
editor.open(id); // open the original again
expect(editor.exportFile(exportFileTest)).to.be('hello world');
View
2  test/test.getElement.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false, getIframeDoc:false */
+
describe('.getElement(element)', function () {
var testEl
, id
View
2  test/test.getFiles.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.getFiles([name])', function () {
var testEl
, id
View
2  test/test.importFile.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.importFile([fileName],[content])', function () {
var testEl
, id
View
2  test/test.is.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.is(state)', function () {
var testEl
, id
View
2  test/test.load.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false, getIframeDoc:false, getContainer:false */
+
describe(".load([callback])", function () {
var editor
, isLoaded
View
2  test/test.on.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.on(event, handler)', function () {
var testEl
, id
View
2  test/test.open.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.open(fileName)', function () {
var testEl
, id
View
6 test/test.options.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('EpicEditor([options])', function () {
var editor
, id
@@ -17,7 +19,9 @@ describe('EpicEditor([options])', function () {
afterEach(function (done) {
editor.unload();
- el.id === '' && (el.id = id); // to reset in the case where the id is removed
+ if (!el.id) {
+ (el.id = id); // to reset in the case where the id is removed
+ }
removeContainer(id);
done();
})
View
2  test/test.preview.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.preview()', function () {
var testEl
, id
View
2  test/test.remove.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.remove(name)', function () {
var testEl
, id
View
2  test/test.removeListener.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.removeListener(event, [handler])', function () {
var testEl
, id
View
2  test/test.rename.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.rename(oldName, newName)', function () {
var testEl
, id
View
2  test/test.save.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.save()', function () {
var testEl
, id
View
2  test/test.unload.js
@@ -1,3 +1,5 @@
+/*global createContainer:false, removeContainer:false, rnd:false */
+
describe('.unload([callback])', function () {
var testEl
, id
Please sign in to comment.
Something went wrong with that request. Please try again.