I think you added to much intelligence to the mock here

all you need to check is that Compose.clear() has not been called, so you can just spy on Compose.clear using sinon