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:
Vendored
+3
-30
@@ -20,7 +20,7 @@ var kotlinJsTestLocation = process.env.KOTLIN_JS_TEST_LOCATION || __dirname + "/
|
||||
|
||||
var kotlin = require("kotlin");
|
||||
var kotlinTest = require(kotlinJsTestLocation);
|
||||
supplyAsserter(kotlin, kotlinTest);
|
||||
supplyAsserter(kotlinTest);
|
||||
var requireFromString = require('require-from-string');
|
||||
|
||||
var baseDir = "out";
|
||||
@@ -102,33 +102,6 @@ function runTest(testRunner, location) {
|
||||
});
|
||||
}
|
||||
|
||||
function supplyAsserter(kotlin, kotlinTest) {
|
||||
function AsserterClass() {
|
||||
}
|
||||
AsserterClass.prototype.assertTrue_o10pc4$ = function(lazyMessage, actual) {
|
||||
kotlinTest.kotlin.test.assertTrue_ifx8ge$(actual, lazyMessage());
|
||||
};
|
||||
AsserterClass.prototype.assertTrue_4mavae$ = function(message, actual) {
|
||||
if (!actual) {
|
||||
this.failWithMessage(message);
|
||||
}
|
||||
};
|
||||
AsserterClass.prototype.assertNotNull_67rc9h$ = kotlinTest.kotlin.test.Asserter.prototype.assertNotNull_67rc9h$;
|
||||
AsserterClass.prototype.assertEquals_lzc6tz$ = kotlinTest.kotlin.test.Asserter.prototype.assertEquals_lzc6tz$;
|
||||
AsserterClass.prototype.fail_pdl1vj$ = function(message) {
|
||||
this.failWithMessage(message);
|
||||
};
|
||||
AsserterClass.prototype.failWithMessage = function(message) {
|
||||
if (message == null) {
|
||||
throw new Kotlin.AssertionError();
|
||||
}
|
||||
else {
|
||||
throw new Kotlin.AssertionError(message);
|
||||
}
|
||||
};
|
||||
AsserterClass.$metadata$ = {
|
||||
type: kotlin.Kind.CLASS,
|
||||
baseClasses: [kotlinTest.kotlin.test.Asserter]
|
||||
};
|
||||
kotlinTest.kotlin.test._asserter = new AsserterClass();
|
||||
function supplyAsserter(kotlinTest) {
|
||||
kotlinTest.kotlin.test.overrideAsserter_wbnzx$(new kotlinTest.kotlin.test.DefaultAsserter());
|
||||
}
|
||||
Reference in New Issue
Block a user