Browse Source

First integration of Karma.js into Maven build (-Pjs)

tags/4.1-RC1
Simon Brandhof 10 years ago
parent
commit
258092dd4e
2 changed files with 35 additions and 1 deletions
  1. 9
    1
      sonar-server/karma.conf.js
  2. 26
    0
      sonar-server/pom.xml

+ 9
- 1
sonar-server/karma.conf.js View File

@@ -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,


+ 26
- 0
sonar-server/pom.xml View File

@@ -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>

Loading…
Cancel
Save