I am new to unit testing using Mocha and should.js. I am using Mocha BDD to test my application. The application I'm testing has different components, such as account, products, and order. Before moving the code to the git repository, I want to check all aspects of the application. I have different test files for all components. For example, account.js for an account, order.js for an order, etc.
I want to test all components in a temporary test account. So the thread:
- Create Test Account
- Check all the functions associated with the account (update profile, change password, etc.)
- Check all the functionality of the product account
- Check all account functionality
- Delete the test account and all information associated with it.
My question is, how do I get a temporary account to be created before performing other tests?
Since I have test cases in different files, how can I make sure they are executed in the same order as above? Is there any other better way to test the application?
Thanks.
sunilkumarba
source share