diff options
-rw-r--r-- | sonar-server/karma.conf.js | 10 | ||||
-rw-r--r-- | sonar-server/pom.xml | 26 |
2 files changed, 35 insertions, 1 deletions
diff --git a/sonar-server/karma.conf.js b/sonar-server/karma.conf.js index a34f18cf6f4..269a010f7ca 100644 --- a/sonar-server/karma.conf.js +++ b/sonar-server/karma.conf.js @@ -48,8 +48,15 @@ module.exports = function(config) { }, + plugins: [ + 'karma-qunit', + 'karma-phantomjs-launcher', + 'karma-coverage', + 'karma-junit-reporter' + ], + + // test results reporter to use - // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' reporters: ['progress', 'coverage', 'junit'], @@ -62,6 +69,7 @@ module.exports = function(config) { outputFile : '../../../../target/karma/test-results.xml' }, + // WARNING - the 2 following ports should not be hardcoded in CI environments // web server port port: 9876, diff --git a/sonar-server/pom.xml b/sonar-server/pom.xml index e05d4a24015..727c49e9c28 100644 --- a/sonar-server/pom.xml +++ b/sonar-server/pom.xml @@ -594,6 +594,32 @@ </plugins> </build> </profile> + + <profile> + <!-- experimental profile --> + <id>js</id> + <build> + <plugins> + <plugin> + <groupId>com.kelveden</groupId> + <artifactId>maven-karma-plugin</artifactId> + <version>1.5</version> + <configuration> + <configFile>${basedir}/karma.conf.js</configFile> + </configuration> + <executions> + <execution> + <id>karma</id> + <goals> + <goal>start</goal> + </goals> + <phase>process-test-classes</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> </profiles> </project> |