Commit Graph

7 Commits

Author SHA1 Message Date
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
Bart
03bc92006d Added tests for AppImPanelController, DocumentModalController, EmbedModalController and VideoModalController (#1362)
* Added test for AppImPanelControllerSpec, cleaned up style of all tests

All tests give 0 errors when running gulp standard
All credits for those test still go to @Ryuno-Ki, I did not functionaly change the testing code

* add Test for DocumentModalController

* added tests for the EmbedModalController and VideoModalController
2017-04-03 17:01:53 +03:00
Bart
5099d14df9 Added test for ChangeLogModalController, AppFooterController and PeerSelectController (#1355)
* Added test for ChangeLogModalController
This commit changes the test scores as follows

|     | % Statements | % Branch | % Functions | % Lines |
|:---:|:------------:|:--------:|-------------|---------|
| Old |      3.5     |     0    | 0.36        | 3.52    |
| New |     4.22     |   0.36   | 1.08        | 4.24    |

* Added tests for AppFooterController
This commit changes the test scores as follows

|     | % Statements | % Branch | % Functions | % Lines |
|:---:|:------------:|:--------:|-------------|---------|
| Old |     4.22     |   0.36   |    1.08     |   4.24  |
| New |     4.29     |   0.36   |    1.44     |   4.31  |

* Added tests for PeerSelectController
This commit changes the test scores as follows

|     | % Statements | % Branch | % Functions | % Lines |
|:---:|:------------:|:--------:|-------------|---------|
| Old |     4.29     |   0.36   |    1.44     |   4.31  |
| New |     5.61     |   1.16   |    2.88     |   5.64  |

* Change Time-out time to variable
Instead of doing time-outs based on a constant, the time-out is based on a variable. This will make changing the time of time-out easier.

* Rename AppFooterController test, removed unnecessary test, fixed code style

Renamed test/unit/AppFooterController.js to test/unit/AppFooterControllerSpec.js to conform with other test files.
Removed a test in the renamed file. It only tested if the controller would compile given the test-environment, something that was implicitly tested in the other (now only) test.
The code style over all test files was not consistent (spacing), this is fixed.

* Changed style to StandardJS

When running "standard test/unit/..", there were some errors on the code-style of the tests
These are fixed
2017-03-13 21:57:11 +03:00
André Jaenisch
6f8676dd74 Add karma, Jasmine, deps and karma.conf.js. Fixes #1291 (#1293)
* Add karma, Jasmine, deps and karma.conf.js. Fixes #1291

* Improved service worker code

* npm start script executes gulp watch task.

* Written a gulp task to compile templates AOT. Get rid of loading deps in unit tests and a preprocessor.

* PhantomJS package is deprecated. Use phantomjs-prebuilt instead.

* Adjust `npm run test`.
2017-01-12 18:09:31 +03:00
Paul Miller
fe95bb616f Remove unused files which just pollute the project. 2014-01-24 19:19:23 +04:00
Igor Zhukov
b077e126e5 Migrate to angular 1.2.9, fixed slow images load 2014-01-22 14:09:49 +04:00
Igor Zhukov
0993489baf Initial import 2014-01-05 20:07:11 +04:00