Unit testing scripts

Any ideas for unit testing scripts?

I would forward you to this thread http://stackoverflow.com/questions/300855/javascript-unit-test-tools-for-tdd . Scripts are just Javascript so you can use existing frameworks to unit test. There is not one right way of doing this you kinda have to figure something out depending on your use case.

If you want to test game behavior you can make different packs for each test case and have a script that checks the outcome of an action after a while for example.

I just wondered if there was a standard way to introduce the pc variable into a test script. An example would be nice.