Skip to content
Extraits de code Groupes Projets
Valider 29cee449 rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

added file structure

parent 275b6b0f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -15,6 +15,14 @@ On Ubuntu you might be able to use the `scripts/install-ubuntu.sh` script. Have ...@@ -15,6 +15,14 @@ On Ubuntu you might be able to use the `scripts/install-ubuntu.sh` script. Have
* [Mocha](http://visionmedia.github.io/mocha/) * [Mocha](http://visionmedia.github.io/mocha/)
* You need more assertions? Have a look at [Chai plugins](http://chaijs.com/plugins) * You need more assertions? Have a look at [Chai plugins](http://chaijs.com/plugins)
## File structure
We do not have a general `tests` folder containing all test files. Instead we create a file having the same name appended by "_test.js" in the same directory.
For instance you want to test a file named `startfrom.js` then we create a file named `startfrom_test.js`:
`plugins/CoreHome/angularjs/common/filters/startfrom.js` =>
`plugins/CoreHome/angularjs/common/filters/startfrom_test.js`
## Execution ## Execution
Run tests and run them automatically again once there is a file change: Run tests and run them automatically again once there is a file change:
...@@ -31,7 +39,7 @@ You can change the `browsers: ['Chrome', 'Firefox', 'PhantomJS']` property in `k ...@@ -31,7 +39,7 @@ You can change the `browsers: ['Chrome', 'Firefox', 'PhantomJS']` property in `k
## Testing existing jQuery code ## Testing existing jQuery code
TBD Just in case you want to write a test for your jQuery code you can do this the same way. You might be interested in the [Chai jQuery](http://chaijs.com/plugins/chai-jquery) plugin.
## Examples ## Examples
* [Testing a filter](plugins/CoreHome/angularjs/common/filters/startfrom_test.js) * [Testing a filter](plugins/CoreHome/angularjs/common/filters/startfrom_test.js)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter