From dc59f4bf65e68d01d19b3a6185333d9a98d463f8 Mon Sep 17 00:00:00 2001 From: Oguz Date: Sat, 1 Aug 2020 20:12:33 +0200 Subject: [PATCH] improve path removeFinishCallback API test --- test/core/PathTest.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/core/PathTest.js b/test/core/PathTest.js index 5cb2a88..5861a08 100644 --- a/test/core/PathTest.js +++ b/test/core/PathTest.js @@ -313,14 +313,16 @@ describe("Path", function(){ expect(path.finishCallbacksByID).to.eql(expected); - path.removeFinishCallback(callbackID1); + expect(path.removeFinishCallback(callbackID1)).to.eql(true); delete expected[callbackID1]; expect(path.finishCallbacksByID).to.eql(expected); - path.removeFinishCallback(callbackID2); - + expect(path.removeFinishCallback(callbackID2)).to.eql(true); + expect(path.finishCallbacksByID).to.eql({}); + + expect(path.removeFinishCallback("some_random_id")).to.eql(false); }); it("should remove finish callback", function(){