From 65bf36141e52fba4d3a1d75b8ccfcba680bddd4a Mon Sep 17 00:00:00 2001 From: BorisLevitskiy Date: Thu, 9 Apr 2015 17:29:40 +0300 Subject: [PATCH] Started to implement tests --- karma.conf.js | 15 +++++++++++++++ package.json | 5 ++++- tests/stubSpec.js | 8 ++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 karma.conf.js create mode 100644 tests/stubSpec.js diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 0000000..fee7859 --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,15 @@ +module.exports = function(config) { + config.set({ + frameworks: ['jasmine'], + + files: [ + 'src/js/core/core.js', + 'src/js/core/is.js', + 'src/js/core/di.js', + 'src/js/core/appShell.js', + 'src/js/core/observable.js', + 'src/js/app.js', + 'tests/*.js' + ] + }); +}; diff --git a/package.json b/package.json index 5b99db9..3165e79 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,9 @@ "grunt-contrib-copy": "^0.8.0", "grunt-contrib-cssmin": "^0.12.2", "grunt-contrib-uglify": "^0.9.1", - "grunt-processhtml": "^0.3.7" + "grunt-processhtml": "^0.3.7", + "jasmine": "^2.2.1", + "karma": "^0.12.31", + "karma-jasmine": "^0.2.2" } } diff --git a/tests/stubSpec.js b/tests/stubSpec.js new file mode 100644 index 0000000..d10fabe --- /dev/null +++ b/tests/stubSpec.js @@ -0,0 +1,8 @@ +describe("App test", function() { + var app = window.app; + + it("shouldn't be null", function() { + console.log(app); + expect(app.constructor).notBeNull(); + }); +}); \ No newline at end of file