I am trying to test a package that I am working on - writing some server side integration tests. I am using Jasmine and Velocity. A problem I am having is that I am getting the following error in one of my tests:
Error: A method named '/contentTypes/insert' is already defined
I have two integration tests set up so far and in testing my functions, I am declaring a new collection more than once, because I am declaring it once inside each test.
How can I set it up so that when my test has completed, the collection no longer exists so that when I attempt to create it again then it would be as if it had never existed.
I tried the following in cleaning up at the end of a test, but it doesn’t work
Collections.contentTypes = null; // doesn't work delete Collections.contentTyoes; // doesn't work