-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[K/JS] Fix file extension inside the JS KGP to run tests with ES modu…
…les ^KT-63719 Fixed
- Loading branch information
1 parent
87c8aa1
commit 262697d
Showing
9 changed files
with
129 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...tegration-tests/src/test/resources/testProject/kotlin-js-project-failed-test/TEST-all.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<results> | ||
<testsuite name="Tests" tests="1" skipped="0" failures="1" errors="0" timestamp="..." hostname="..." time="..."> | ||
<properties /> | ||
<testcase name="testHello[node]" classname="Tests" time="..."> | ||
<failure message="..." type="AssertionError">...</failure> | ||
</testcase> | ||
<system-out /> | ||
<system-err /> | ||
</testsuite> | ||
</results> |
22 changes: 22 additions & 0 deletions
22
...tegration-tests/src/test/resources/testProject/kotlin-js-project-failed-test/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile | ||
|
||
plugins { | ||
id("org.jetbrains.kotlin.js") | ||
} | ||
|
||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib-js") | ||
testImplementation("org.jetbrains.kotlin:kotlin-test-js") | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
|
||
kotlin { | ||
js { | ||
binaries.executable() | ||
nodejs() | ||
} | ||
} |
Empty file.
1 change: 1 addition & 0 deletions
1
...tion-tests/src/test/resources/testProject/kotlin-js-project-failed-test/gradle.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
kotlin.tests.individualTaskReports=true |
10 changes: 10 additions & 0 deletions
10
...ests/src/test/resources/testProject/kotlin-js-project-failed-test/src/main/kotlin/Base.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. | ||
*/ | ||
|
||
package com.example | ||
|
||
fun getValue(): Int { | ||
return 42 | ||
} |
14 changes: 14 additions & 0 deletions
14
...sts/src/test/resources/testProject/kotlin-js-project-failed-test/src/test/kotlin/Tests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. | ||
*/ | ||
|
||
import kotlin.test.Test | ||
import kotlin.test.assertEquals | ||
|
||
class Tests { | ||
@Test | ||
fun testHello() { | ||
assertEquals(73, com.example.getValue()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters