JS: generate paths in source maps relative to .map file location

See KT-19818

Original commit: 9008791a54
This commit is contained in:
Alexey Andreev
2017-08-29 14:28:15 +03:00
parent d42ddff160
commit 2cf01f60b3
2 changed files with 6 additions and 2 deletions
@@ -359,7 +359,7 @@ open class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
buildAllModules().assertSuccessful()
val sourceMapContent = File(getOutputDir(PROJECT_NAME), "$PROJECT_NAME.js.map").readText()
val expectedPath = "prefix-dir/pkg/test1.kt"
val expectedPath = "prefix-dir/src/pkg/test1.kt"
assertTrue("Source map file should contain relative path ($expectedPath)", sourceMapContent.contains("\"$expectedPath\""))
val librarySourceMapFile = File(getOutputDir(PROJECT_NAME), "lib/kotlin.js.map")