Run kotlin-test-js tests with kotlin-stdlib-js
Rework kotlin-test common tests to make them runnable with qunit. Change the way how asserter is overridden in js box tests. Minor: remove unneeded test configs
This commit is contained in:
@@ -38,13 +38,14 @@ inline fun <reified T : Throwable> assertFailsWith(message: String? = null, noin
|
||||
}
|
||||
*/
|
||||
|
||||
var _asserter: Asserter = QUnitAsserter()
|
||||
|
||||
/**
|
||||
* Provides the JS implementation of asserter using [QUnit](http://QUnitjs.com/)
|
||||
*/
|
||||
internal impl fun lookupAsserter(): Asserter = _asserter
|
||||
internal impl fun lookupAsserter(): Asserter = qunitAsserter
|
||||
|
||||
private val qunitAsserter = QUnitAsserter()
|
||||
|
||||
// TODO: make object in 1.2
|
||||
class QUnitAsserter : Asserter {
|
||||
|
||||
override fun assertTrue(lazyMessage: () -> String?, actual: Boolean) {
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* 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']
|
||||
}
|
||||
}
|
||||
)
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user