Skip to content

Commit 355e146

Browse files
committed
Formatting;
1 parent 13a9837 commit 355e146

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

tests/observer.lua

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ describe('Observer', function()
1212
end)
1313

1414
it('works when onNext callback parameter is passed', function()
15-
local observer = Rx.Observer.create(function () end)
15+
local observer = Rx.Observer.create(function() end)
1616
expectObserverToBeInCleanStateAndValid(observer)
1717
end)
1818

1919
it('works when onError callback parameter is passed', function()
20-
local observer = Rx.Observer.create(nil, function () end)
20+
local observer = Rx.Observer.create(nil, function() end)
2121
expectObserverToBeInCleanStateAndValid(observer)
2222
end)
2323

2424
it('works when onComplete callback parameter is passed', function()
25-
local observer = Rx.Observer.create(nil, nil, function () end)
25+
local observer = Rx.Observer.create(nil, nil, function() end)
2626
expectObserverToBeInCleanStateAndValid(observer)
2727
end)
2828

2929
it('works when all callback parameters are passed', function()
30-
local observer = Rx.Observer.create(function () end, function () end, function () end)
30+
local observer = Rx.Observer.create(function() end, function() end, function() end)
3131
expectObserverToBeInCleanStateAndValid(observer)
3232
end)
3333
end)
@@ -53,12 +53,12 @@ describe('Observer', function()
5353

5454
-- would gladly use something like to_not.fail() here but it's
5555
-- not quite good with producing useful error messages
56-
local success = tryCall(function () observer:onNext() end, errors)
57-
tryCall(function () expect(success).to.equal(true) end, errors)
56+
local success = tryCall(function() observer:onNext() end, errors)
57+
tryCall(function() expect(success).to.equal(true) end, errors)
5858
throwErrorsIfAny(errors)
5959
end)
6060

61-
describe('does not call custom onError callback', function ()
61+
describe('does not call custom onError callback', function()
6262
it('if observer already received completion notification', function()
6363
local onNext = spy()
6464
local observer = Rx.Observer.create(onNext, nil, nil)
@@ -80,7 +80,7 @@ describe('Observer', function()
8080
describe('onError', function()
8181
it('causes an error by default if custom onError callback was not provided', function()
8282
local observer = Rx.Observer.create()
83-
expect(function () observer:onError() end).to.fail()
83+
expect(function() observer:onError() end).to.fail()
8484
end)
8585

8686
it('calls custom onError callback if it was provided', function()
@@ -103,7 +103,7 @@ describe('Observer', function()
103103
expect(observer.stopped).to.equal(true)
104104
end)
105105

106-
describe('does not call custom onError callback', function ()
106+
describe('does not call custom onError callback', function()
107107
it('if observer already received completion notification', function()
108108
local onError = spy()
109109
local observer = Rx.Observer.create(nil, onError, nil)
@@ -115,7 +115,7 @@ describe('Observer', function()
115115
it('if observer already received error notification', function()
116116
local spyEnabled = false
117117
local onError = spy()
118-
local observer = Rx.Observer.create(nil, function () if spyEnabled then onError() end end, nil)
118+
local observer = Rx.Observer.create(nil, function() if spyEnabled then onError() end end, nil)
119119
observer:onError()
120120
spyEnabled = true
121121
observer:onError()
@@ -145,11 +145,11 @@ describe('Observer', function()
145145
expect(observer.stopped).to.equal(true)
146146
end)
147147

148-
describe('does not call custom onCompleted callback', function ()
148+
describe('does not call custom onCompleted callback', function()
149149
it('if observer already received completion notification', function()
150150
local spyEnabled = false
151151
local onCompleted = spy()
152-
local observer = Rx.Observer.create(nil, function () if spyEnabled then onCompleted() end end, nil)
152+
local observer = Rx.Observer.create(nil, function() if spyEnabled then onCompleted() end end, nil)
153153
observer:onCompleted()
154154
spyEnabled = true
155155
observer:onCompleted()
@@ -158,7 +158,7 @@ describe('Observer', function()
158158

159159
it('if observer already received error notification', function()
160160
local onCompleted = spy()
161-
local observer = Rx.Observer.create(nil, function () end, onCompleted)
161+
local observer = Rx.Observer.create(nil, function() end, onCompleted)
162162
observer:onError()
163163
observer:onCompleted()
164164
expect(#onCompleted).to.equal(0)

tests/runner.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function tryCall(fn, errorsAccumulator)
1010
local errNum = #errorsAccumulator
1111

1212
xpcall(fn, function (err)
13-
table.insert(errorsAccumulator, err)
13+
table.insert(errorsAccumulator, err)
1414
end)
1515

1616
return #errorsAccumulator == errNum

0 commit comments

Comments
 (0)