adding testDeprecateEvent to test-deprecate.js