Add kotlin.test library

This commit is contained in:
Sergey Mashkov
2015-11-24 15:17:42 +03:00
parent dd36ef5712
commit 1867abbbe7
27 changed files with 1526 additions and 0 deletions
+90
View File
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>kotlin.test</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>kotlin.test.js</artifactId>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-test-resources</phase>
<configuration>
<includeScope>test</includeScope>
<includeTypes>jar</includeTypes>
<outputDirectory>${project.basedir}/target/test-js</outputDirectory>
<includes>*.js</includes>
<excludes>*.meta.js</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>install node and npm</id>
<!--<phase>generate-test-resources</phase>-->
<phase>none</phase>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
</configuration>
</execution>
<execution>
<id>npm install</id>
<!--<phase>generate-test-resources</phase>-->
<phase>none</phase>
<goals>
<goal>npm</goal>
</goals>
<!-- Optional configuration which provides for running any npm command -->
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>javascript tests</id>
<goals>
<goal>karma</goal>
</goals>
<!-- disable js tests -->
<phase>none</phase>
<configuration>
<karmaConfPath>${project.basedir}/src/test/karma/karma.conf.js</karmaConfPath>
</configuration>
</execution>
</executions>
<configuration>
<nodeVersion>v0.12.7</nodeVersion>
<npmVersion>2.14.4</npmVersion>
<workingDirectory>${project.basedir}/src/test/karma</workingDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,47 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = function (config) {
config.set({
frameworks: ['qunit'],
reporters: ['progress', 'junit'],
files: [
'../../../target/test-js/kotlin.js',
'../../../target/test-js/*.js',
'../../../target/classes/*.js'
],
exclude: [],
port: 9876,
runnerPort: 9100,
colors: true,
autoWatch: false,
browsers: [
'PhantomJS'
],
captureTimeout: 5000,
//singleRun: false,
singleRun: true,
reportSlowerThan: 500,
junitReporter: {
outputFile: '../../../target/reports/test-results.xml',
suite: ''
},
preprocessors: {
'**/*.js': ['sourcemap']
}
}
)
};
@@ -0,0 +1,14 @@
{
"name": "karma-tests",
"version": "0.0.0",
"devDependencies": {
"karma": "*",
"qunitjs": "*",
"karma-qunit": "*",
"karma-junit-reporter": "~0.2",
"karma-sourcemap-loader": "~0.3",
"karma-teamcity-reporter": "*",
"karma-phantomjs-launcher": "*",
"phantomjs": "1.9.13"
}
}