diff --git a/package.json b/package.json index f4a01e3..67d50d5 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "karma": "^1.1.0", "karma-coverage": "^1.0.0", "karma-es6-shim": "^1.0.0", + "karma-htmlfile-reporter": "^0.3.4", "karma-jasmine": "^1.0.2", "karma-phantomjs-launcher": "^1.0.1", "karma-spec-reporter": "0.0.26", diff --git a/tests/karma.config.js b/tests/karma.config.js index 5a450c0..ceebcbd 100644 --- a/tests/karma.config.js +++ b/tests/karma.config.js @@ -6,13 +6,21 @@ module.exports = function(config) { files: [ '../tests/**/*_spec.js', ], - plugins: [webpack, 'karma-jasmine', 'karma-phantomjs-launcher', 'karma-coverage', 'karma-spec-reporter', 'es6-shim'], + plugins: [ + webpack, + 'karma-jasmine', + 'karma-phantomjs-launcher', + 'karma-coverage', + 'karma-spec-reporter', + 'karma-htmlfile-reporter', + 'es6-shim' + ], browsers: ['PhantomJS'], preprocessors: { '**/*_spec.js': ['webpack'], 'src/**/*.js': ['webpack'] }, - reporters: ['spec', 'coverage'], + reporters: ['spec', 'coverage', 'html'], coverageReporter: { dir: '../tests/reports/coverage', reporters: [{ @@ -32,5 +40,8 @@ module.exports = function(config) { webpackMiddleware: { noInfo: true }, + htmlReporter: { + outputFile: 'results/unit-tests.html' + } }); }; \ No newline at end of file diff --git a/tests/results/unit-tests.html b/tests/results/unit-tests.html new file mode 100644 index 0000000..5b258b1 --- /dev/null +++ b/tests/results/unit-tests.html @@ -0,0 +1,420 @@ + + +
+ ++ 44 tests / + 0 errors / + 0 failures / + 0 skipped / + runtime: 0.099s +
+should initialize Choices
+ should be defined +should initialize Choices
+ should have initalised +should initialize Choices
+ should not re-initialise if passed element again +should initialize Choices
+ should have a blank state +should initialize Choices
+ should have config options +should initialize Choices
+ should expose public methods +should initialize Choices
+ should hide passed input +should initialize Choices
+ should create an outer container +should initialize Choices
+ should create an inner container +should initialize Choices
+ should create a choice list +should initialize Choices
+ should create an item list +should initialize Choices
+ should create an input +should initialize Choices
+ should create a dropdown +should handle text inputs
+ should set value via using setValue() +should handle text inputs
+ should accept a user inputted value +should handle text inputs
+ should copy the passed placeholder to the cloned input +should handle single select inputs
+ should open the choice list on focussing +should handle single select inputs
+ should select the first choice +should handle single select inputs
+ should highlight the choices on keydown +should handle single select inputs
+ should select choice on enter key press +should handle single select inputs
+ should trigger a change callback on selection +should handle single select inputs
+ should filter choices when searching +should handle multiple select inputs
+ should add any pre-defined values +should handle multiple select inputs
+ should add options defined in the config + pre-defined options +should handle multiple select inputs
+ should add a placeholder (set in config) to the search input +should handle public methods on select input types
+ should handle highlightItem() +should handle public methods on select input types
+ should handle unhighlightItem() +should handle public methods on select input types
+ should handle highlightAll() +should handle public methods on select input types
+ should handle unhighlightAll() +should handle public methods on select input types
+ should handle removeHighlightedItems() +should handle public methods on select input types
+ should handle showDropdown() +should handle public methods on select input types
+ should handle hideDropdown() +should handle public methods on select input types
+ should handle toggleDropdown() +should handle public methods on select input types
+ should handle hideDropdown() +should handle public methods on select input types
+ should handle getValue() +should handle public methods on select input types
+ should handle setValue() +should handle public methods on select input types
+ should handle setValueByChoice() +should handle public methods on select input types
+ should handle setChoices() +should handle public methods on select input types
+ should handle clearStore() +should handle public methods on select input types
+ should handle disable() +should handle public methods on select input types
+ should handle enable() +should handle public methods on select input types
+ should handle ajax() +should handle public methods on text input types
+ should handle clearInput() +should handle public methods on text input types
+ should handle removeItemsByValue() +