Skip to content

Commit

Permalink
Test: Added tests for events (almost finished)
Browse files Browse the repository at this point in the history
  • Loading branch information
jy95 committed Sep 8, 2017
1 parent 9461036 commit 78c9fe3
Show file tree
Hide file tree
Showing 10 changed files with 152 additions and 17 deletions.
8 changes: 4 additions & 4 deletions docs/TorrentLibrary.html
Expand Up @@ -3577,7 +3577,7 @@ <h5 class="subsection-title">Properties:</h5>



<td class="description last"><p>all the files that were found and added if not yet in lib</p></td>
<td class="description last"><p>all the files that were found and removed if not yet in lib</p></td>
</tr>


Expand Down Expand Up @@ -3666,7 +3666,7 @@ <h5>Type:</h5>
<div class="section-examples">
<h5>Example</h5>

<pre class="prettyprint"><code>TorrentLibraryInstance.on('addNewPath',function(callback){ console.log('The following files were added : ' + callback.files);})</code></pre>
<pre class="prettyprint"><code>TorrentLibraryInstance.on('removeOldFiles',function(callback){ console.log('The following files were added : ' + callback.files);})</code></pre>

</div>

Expand Down Expand Up @@ -3822,7 +3822,7 @@ <h5>Type:</h5>
<div class="section-examples">
<h5>Example</h5>

<pre class="prettyprint"><code>TorrentLibraryInstance.on('addNewPath',function(callback){ console.log('The following files were added : ' + callback.files);})</code></pre>
<pre class="prettyprint"><code>TorrentLibraryInstance.on('scan',function(callback){ console.log('The following files were found : ' + callback.files);})</code></pre>

</div>

Expand All @@ -3841,7 +3841,7 @@ <h5>Example</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Fri Sep 08 2017 11:20:58 GMT+0200 (Romance Daylight Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Fri Sep 08 2017 11:55:10 GMT+0200 (Romance Daylight Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/TorrentLibrary.js.html
Expand Up @@ -609,7 +609,7 @@ <h1 class="page-title">TorrentLibrary.js</h1>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Fri Sep 08 2017 11:20:58 GMT+0200 (Romance Daylight Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Fri Sep 08 2017 11:55:10 GMT+0200 (Romance Daylight Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/external-Promise.html
Expand Up @@ -139,7 +139,7 @@ <h2>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Fri Sep 08 2017 11:20:58 GMT+0200 (Romance Daylight Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Fri Sep 08 2017 11:55:10 GMT+0200 (Romance Daylight Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Expand Up @@ -183,7 +183,7 @@ <h3 id="list-each-tv-serie">
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Fri Sep 08 2017 11:20:58 GMT+0200 (Romance Daylight Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Fri Sep 08 2017 11:55:10 GMT+0200 (Romance Daylight Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
10 changes: 5 additions & 5 deletions docs/jsdoc_events.js.html
Expand Up @@ -81,18 +81,18 @@ <h1 class="page-title">jsdoc/events.js</h1>
* @type {object}
* @property {...string} files - all the files that were found and added if not yet in lib
* @example
* TorrentLibraryInstance.on('addNewPath',function(callback){
* console.log('The following files were added : ' + callback.files);
* TorrentLibraryInstance.on('scan',function(callback){
* console.log('The following files were found : ' + callback.files);
* })
*/

/**
* removeOldFiles event
* @event TorrentLibrary#removeOldFiles
* @type {object}
* @property {...string} files - all the files that were found and added if not yet in lib
* @property {...string} files - all the files that were found and removed if not yet in lib
* @example
* TorrentLibraryInstance.on('addNewPath',function(callback){
* TorrentLibraryInstance.on('removeOldFiles',function(callback){
* console.log('The following files were added : ' + callback.files);
* })
*/
Expand All @@ -108,7 +108,7 @@ <h1 class="page-title">jsdoc/events.js</h1>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Fri Sep 08 2017 11:20:58 GMT+0200 (Romance Daylight Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Fri Sep 08 2017 11:55:10 GMT+0200 (Romance Daylight Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jsdoc_types.js.html
Expand Up @@ -117,7 +117,7 @@ <h1 class="page-title">jsdoc/types.js</h1>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Fri Sep 08 2017 11:20:58 GMT+0200 (Romance Daylight Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Fri Sep 08 2017 11:55:10 GMT+0200 (Romance Daylight Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
99 changes: 99 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -85,6 +85,7 @@
"minami": "^1.2.3",
"mocha": "^3.5.0",
"semantic-release": "^8.0.0",
"sinon": "^3.2.1",
"sr-commit-analyzer": "^2.0.2",
"sr-release-notes-generator": "^1.1.2"
},
Expand Down
8 changes: 4 additions & 4 deletions src/jsdoc/events.js
Expand Up @@ -40,18 +40,18 @@
* @type {object}
* @property {...string} files - all the files that were found and added if not yet in lib
* @example
* TorrentLibraryInstance.on('addNewPath',function(callback){
* console.log('The following files were added : ' + callback.files);
* TorrentLibraryInstance.on('scan',function(callback){
* console.log('The following files were found : ' + callback.files);
* })
*/

/**
* removeOldFiles event
* @event TorrentLibrary#removeOldFiles
* @type {object}
* @property {...string} files - all the files that were found and added if not yet in lib
* @property {...string} files - all the files that were found and removed if not yet in lib
* @example
* TorrentLibraryInstance.on('addNewPath',function(callback){
* TorrentLibraryInstance.on('removeOldFiles',function(callback){
* console.log('The following files were added : ' + callback.files);
* })
*/

0 comments on commit 78c9fe3

Please sign in to comment.