aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore10
-rw-r--r--sonar-server/.gitignore2
-rw-r--r--sonar-server/karma.conf.js (renamed from sonar-server/src/main/webapp/javascripts/tests/karma.conf.js)28
-rw-r--r--sonar-server/package.json12
-rw-r--r--sonar-server/src/main/webapp/javascripts/tests/package.json11
5 files changed, 38 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
index c5b172c3537..feb8c276e46 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+# The following should be moved in related sub-directories
sonar-server/src/main/webapp/stylesheets/sonar-colorizer.css
sonar-server/src/main/webapp/deploy/gwt
sonar-server/src/main/webapp/deploy/plugins
@@ -7,20 +8,19 @@ sonar-server/src/main/webapp/WEB-INF/log/
sonar-server/src/main/webapp/deploy/*.jar
sonar-server/src/main/webapp/deploy/jdbc-driver.txt
-# javadoc
+# ---- Javadoc
docs.tar
-# Maven
+# ---- Maven
target/
-# IntelliJ IDEA
+# ---- IntelliJ IDEA
*.iws
*.iml
*.ipr
.idea/
-sonar-server/src/main/webapp/WEB-INF/.rakeTasks
-# Eclipse
+# ---- Eclipse
.classpath
.project
.settings
diff --git a/sonar-server/.gitignore b/sonar-server/.gitignore
new file mode 100644
index 00000000000..761ad855390
--- /dev/null
+++ b/sonar-server/.gitignore
@@ -0,0 +1,2 @@
+# nodeJS dependencies
+node_modules/ \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/javascripts/tests/karma.conf.js b/sonar-server/karma.conf.js
index edd6fcaa2ba..a34f18cf6f4 100644
--- a/sonar-server/src/main/webapp/javascripts/tests/karma.conf.js
+++ b/sonar-server/karma.conf.js
@@ -1,13 +1,20 @@
/* global module:false, karma:false */
-// Karma configuration
-// Generated on Mon Dec 02 2013 14:50:55 GMT+0600 (YEKT)
+// Karma configuration for JS application
-module.exports = function(karma) {
- karma.configure({
+// GLOBAL INSTALLATION
+// sonar-server$ npm install -g
+// sonar-server$ karma start
+
+// LOCAL INSTALLATION
+// sonar-server$ npm install
+// sonar-server$ ./node_modules/.bin/karma start
+
+module.exports = function(config) {
+ config.set({
// base path, that will be used to resolve files and exclude
- basePath: '..',
+ basePath: 'src/main/webapp/javascripts',
// frameworks to use
@@ -32,7 +39,7 @@ module.exports = function(karma) {
// list of files to exclude
exclude: [
-
+
],
@@ -43,14 +50,17 @@ module.exports = function(karma) {
// test results reporter to use
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
- reporters: ['progress', 'coverage'],
+ reporters: ['progress', 'coverage', 'junit'],
coverageReporter: {
type : 'text',
- dir : 'coverage/'
+ dir : '../../../../target/karma/coverage/'
},
+ junitReporter: {
+ outputFile : '../../../../target/karma/test-results.xml'
+ },
// web server port
port: 9876,
@@ -66,7 +76,7 @@ module.exports = function(karma) {
// level of logging
// possible values: karma.LOG_DISABLE || karma.LOG_ERROR || karma.LOG_WARN || karma.LOG_INFO || karma.LOG_DEBUG
- logLevel: karma.LOG_INFO,
+ logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
diff --git a/sonar-server/package.json b/sonar-server/package.json
new file mode 100644
index 00000000000..fefb5024205
--- /dev/null
+++ b/sonar-server/package.json
@@ -0,0 +1,12 @@
+{
+ "name": "SonarQube",
+ "version": "0.0.1",
+ "devDependencies": {
+ "qunitjs": "*",
+ "karma": "0.10.8",
+ "karma-qunit": "*",
+ "karma-phantomjs-launcher": "*",
+ "karma-coverage": "*",
+ "karma-junit-reporter": "*"
+ }
+}
diff --git a/sonar-server/src/main/webapp/javascripts/tests/package.json b/sonar-server/src/main/webapp/javascripts/tests/package.json
deleted file mode 100644
index 517a3ac50b4..00000000000
--- a/sonar-server/src/main/webapp/javascripts/tests/package.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "sonar",
- "version": "0.0.1",
- "dependencies": {
- "qunitjs": "*",
- "karma": "0.9.3",
- "karma-qunit": "*",
- "karma-phantomjs-launcher": "*",
- "karma-coverage": "*"
- }
-}