Skip to content

Commit

Permalink
improve path removeFinishCallback API test
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzeroglu committed Aug 1, 2020
1 parent f5dec38 commit dc59f4b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/core/PathTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down

0 comments on commit dc59f4b

Please sign in to comment.