Commit Graph

3 Commits

Author SHA1 Message Date
Bart
aea8530556 Added tests to improve Controller test coverage to over 10% (#1428)
* fully tested CountrySelectModal Controller

* Added test CountrySelectModal Controller for forgotten scenarios

* fully tested ImportContactModal Controller

* fully tested ProfileEditModal Controller and cleanup style of tests

* fully tested PasswordRecoveryModal Controller

* tested most of UsernameEditModal Controller

* Improved readability, refactored beforeEach ImportContactModalControllerSpec

* Tried to make the code more DRY

* removed unnecessary 'this.'
2017-06-28 18:04:48 +03:00
Bart
cd3979aeab Cleanup of tests, improved readability of the test code (#1434)
* Cleanup of tests, improved readability

* Improved readability concerning timeout/loading tests, removed unnecessary 'this.'
2017-06-28 18:03:49 +03:00
Bart
82957f1b91 Added structure to test directory, Fully tested filters.js (#1393)
* added tests for filter.js, Added structure to test-directory

In the gulpfile I changed some of the karma execution to ensure templates.js exists before the tests
Also removed some StandardJS errors from filters.js

* added tests to create at least 50% coverage for filters.js

* Added test for full coverage of filters.js

* fixed 2 side-cases

* Removed duplicate test, improved test-titles and added outcome clarification for dateOrTimeFilter

* Added test-init

While running ``gulp test`` there were a lot of warnings concerning i18n: key not found
This was because init.js was not run.
Because some parts of init.js were not relevant, I created test-init.js, only containing the part concerning localization.
Now the log is a lot cleaner when running ``gulp test``

* added 'use strict' to testing files

* changed local vars to this.

* improved clarity of mistery numbers

* improved in-test structure

* Improved shortUrl tests

* removed unnecessary code

* added cleanup to single test
2017-04-29 11:54:46 +03:00