spec/util_promise_spec.lua
changeset 12756 9ef8f248635c
parent 12755 2639e0e1c378
equal deleted inserted replaced
12755:2639e0e1c378 12756:9ef8f248635c
   478 			r2("this fails");
   478 			r2("this fails");
   479 			assert.spy(cb).was_called(0);
   479 			assert.spy(cb).was_called(0);
   480 			r1("this fails too");
   480 			r1("this fails too");
   481 			assert.spy(cb).was_called(1);
   481 			assert.spy(cb).was_called(1);
   482 			assert.same({
   482 			assert.same({
   483 				{ status = "rejected", value = "this fails too" };
   483 				{ status = "rejected", reason = "this fails too" };
   484 				{ status = "rejected", reason = "this fails" };
   484 				{ status = "rejected", reason = "this fails" };
   485 			}, result);
   485 			}, result);
   486 		end);
   486 		end);
   487 		it("works with non-numeric keys", function ()
   487 		it("works with non-numeric keys", function ()
   488 			local r1, r2;
   488 			local r1, r2;