File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 165
165
166
166
-- 11. Check if events are executing properly
167
167
router :get (" /add" , function (ctx )
168
- cnt = cnt + 1
169
- return cnt
168
+ router : emit ( ' add ' )
169
+ return ctx . cnt
170
170
end )
171
171
172
172
router :get (" /events" , function (ctx )
Original file line number Diff line number Diff line change 119
119
120
120
-- 11. Check if events are executing properly
121
121
router :get (" /add" , function (ctx )
122
- cnt = cnt + 1
123
- return cnt
122
+ router : emit ( ' add ' )
123
+ return ctx . cnt
124
124
end )
125
125
126
126
router :get (" /events" , function (ctx )
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ def run_tests():
188
188
test_endpoint ("/func" , expected_response = "function called" )
189
189
190
190
# 11. Test events
191
- test_endpoint ("/add" , expected_response = 1 )
191
+ test_endpoint ("/add" , expected_response = 0 )
192
192
test_endpoint ("/events" , expected_response = 1 )
193
193
194
194
# 12. Test ctx.response.body
You can’t perform that action at this time.
0 commit comments