mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-04 22:18:06 +02:00
Remove linting errors from spec/util
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@
|
||||
"start": "http-server .",
|
||||
"lint": "eslint js/id && npm run lint:spec",
|
||||
"lint:modules": "eslint modules",
|
||||
"lint:spec": "eslint test/spec/actions test/spec/behavior test/spec/core test/spec/geo test/spec/lib test/spec/presets test/spec/modes test/spec/renderer test/spec/svg"
|
||||
"lint:spec": "eslint test/spec/actions test/spec/behavior test/spec/core test/spec/geo test/spec/lib test/spec/presets test/spec/modes test/spec/renderer test/spec/svg test/spec/ui test/spec/util"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
describe("iD.util.SessionMutex", function() {
|
||||
describe('iD.util.SessionMutex', function() {
|
||||
var clock, a, b;
|
||||
|
||||
beforeEach(function () {
|
||||
@@ -11,19 +11,19 @@ describe("iD.util.SessionMutex", function() {
|
||||
if (b) b.unlock();
|
||||
});
|
||||
|
||||
describe("#lock", function() {
|
||||
it("returns true when it gets a lock", function() {
|
||||
describe('#lock', function() {
|
||||
it('returns true when it gets a lock', function() {
|
||||
a = iD.util.SessionMutex('name');
|
||||
expect(a.lock()).to.equal(true);
|
||||
});
|
||||
|
||||
it("returns true when already locked", function() {
|
||||
it('returns true when already locked', function() {
|
||||
a = iD.util.SessionMutex('name');
|
||||
a.lock();
|
||||
expect(a.lock()).to.equal(true);
|
||||
});
|
||||
|
||||
it("returns false when the lock is held by another session", function() {
|
||||
it('returns false when the lock is held by another session', function() {
|
||||
a = iD.util.SessionMutex('name');
|
||||
a.lock();
|
||||
|
||||
@@ -32,19 +32,19 @@ describe("iD.util.SessionMutex", function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("#locked", function() {
|
||||
it("returns false by default", function() {
|
||||
describe('#locked', function() {
|
||||
it('returns false by default', function() {
|
||||
a = iD.util.SessionMutex('name');
|
||||
expect(a.locked()).to.equal(false);
|
||||
});
|
||||
|
||||
it("returns true when locked", function() {
|
||||
it('returns true when locked', function() {
|
||||
a = iD.util.SessionMutex('name');
|
||||
a.lock();
|
||||
expect(a.locked()).to.equal(true);
|
||||
});
|
||||
|
||||
it("returns false when unlocked", function() {
|
||||
it('returns false when unlocked', function() {
|
||||
a = iD.util.SessionMutex('name');
|
||||
a.lock();
|
||||
a.unlock();
|
||||
@@ -52,8 +52,8 @@ describe("iD.util.SessionMutex", function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("#unlock", function() {
|
||||
it("unlocks the mutex", function() {
|
||||
describe('#unlock', function() {
|
||||
it('unlocks the mutex', function() {
|
||||
a = iD.util.SessionMutex('name');
|
||||
a.lock();
|
||||
a.unlock();
|
||||
@@ -62,7 +62,7 @@ describe("iD.util.SessionMutex", function() {
|
||||
expect(b.lock()).to.equal(true);
|
||||
});
|
||||
|
||||
it("does nothing when the lock is held by another session", function() {
|
||||
it('does nothing when the lock is held by another session', function() {
|
||||
a = iD.util.SessionMutex('name');
|
||||
a.lock();
|
||||
|
||||
@@ -72,14 +72,14 @@ describe("iD.util.SessionMutex", function() {
|
||||
expect(a.locked()).to.equal(true);
|
||||
});
|
||||
|
||||
it("does nothing when not locked", function() {
|
||||
it('does nothing when not locked', function() {
|
||||
a = iD.util.SessionMutex('name');
|
||||
a.unlock();
|
||||
expect(a.locked()).to.equal(false);
|
||||
});
|
||||
});
|
||||
|
||||
it("namespaces locks", function() {
|
||||
it('namespaces locks', function() {
|
||||
a = iD.util.SessionMutex('a');
|
||||
a.lock();
|
||||
|
||||
@@ -88,7 +88,7 @@ describe("iD.util.SessionMutex", function() {
|
||||
expect(b.lock()).to.equal(true);
|
||||
});
|
||||
|
||||
it("automatically unlocks when a session crashes", function() {
|
||||
it('automatically unlocks when a session crashes', function() {
|
||||
// Tested manually.
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
describe("iD.util.SuggestNames", function() {
|
||||
describe('iD.util.SuggestNames', function() {
|
||||
var suggestions = {
|
||||
'key': {
|
||||
'value': {
|
||||
|
||||
Reference in New Issue
Block a user