wwag110465 / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

State not being torn down between test runs #277

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run a test on a public method that increments a private variable (using 
closure module pattern)
2. Run the test again. The private variable will be at the value it was at the 
end of 1), before 2) has been run

What is the expected output? What do you see instead?

No state should be preserved between test runs. Indeed, no state should be 
preserved between individual tests, but I believe there is another ticket open 
for this

What version of the product are you using? On what operating system?

1.3.3b, Windows 7, Chrome 14

Please provide any additional information below.

Original issue reported on code.google.com by bensmawf...@googlemail.com on 5 Oct 2011 at 11:30

GoogleCodeExporter commented 8 years ago
Working as intended. Test and code should be well behaved enough to avoid 
leaving global state (which is exactly the scenario provided, it is basically 
accessing state in a singleton.)

Use --reset on each run if the test leaves global state. 

Original comment by corbinrs...@gmail.com on 5 Oct 2011 at 11:53