I have the tests in my testing folder and I include the scripts under test using hard-coded url address which is not what I want. The picture shows that:
I could possibly change that to use window.location with javascript but is this the best solution?
I could also move the scripts under test inside my testing folder but this would require to keep two copies of the same file. So for example I make a change in the original and then i need to copy these changes to the file that is used for testing. What is the best practice in this case?
Or I do miss some step to make? For example when I make a change to a file it is automatically copied in the testing folder?
Note: The problem I had was, my app draws in canvas but i don't want a canvas inside my unit test pages, so I created stubs and mocks to fake a certain behavior.
Aucun commentaire:
Enregistrer un commentaire