What guidance can we give people about ReSpec and adding event listeners

I ran into an interesting problem today. Even if ReSpec is the first script
in a sequence, there is a risk that subsequent scripts will load and
execute first.  So if, for example, I have code like:

respecEvents.sub('end', function(message) { });

It can throw an error because respecEvents is not yet defined.

What guidance can we give spec authors to avoid this sort of race condition?

-- 
Shane McCarron
Managing Director, Applied Testing and Technology, Inc.

Received on Friday, 10 April 2015 17:31:37 UTC