-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test to catch incorrect line numbers
- Loading branch information
Showing
4 changed files
with
102 additions
and
35 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
50 changes: 26 additions & 24 deletions
50
test/fixtures/preprocessing-sourcemaps/pp-sourcemaps.svelte
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 |
---|---|---|
@@ -1,33 +1,35 @@ | ||
<script lang="typescript"> | ||
interface Test { | ||
yellThisThing: String; | ||
} | ||
interface Test { | ||
yellThisThing: String; | ||
} | ||
function event() { | ||
tryThisThing({ yellThisThing: "something!" }); | ||
change(); | ||
} | ||
function event() { | ||
tryThisThing({ yellThisThing: "something!" }); | ||
change(); | ||
} | ||
function tryThisThing(input: Test) { | ||
console.log(input.yellThisThing.toUpperCase()); | ||
} | ||
function tryThisThing(input: Test) { | ||
console.log(input.yellThisThing.toUpperCase()); | ||
} | ||
let inputBinding: HTMLInputElement; | ||
let inputBinding: HTMLInputElement; | ||
function change() { | ||
inputBinding.value = "testing" + Math.round(Math.random() * 100); | ||
} | ||
function change() { | ||
inputBinding.value = "testing" + Math.round(Math.random() * 100); | ||
} | ||
</script> | ||
|
||
<style lang="scss"> | ||
@use "sourcemapImport.scss"; | ||
@use "sass:color"; | ||
.sourcemap { | ||
$primary-color: #6b717f; | ||
color: $primary-color; | ||
border: 1px solid color.scale($primary-color, $lightness: 20%); | ||
} | ||
</style> | ||
|
||
<button on:click={event} class="sourcemap">Yell "something"</button> | ||
<input type="text" name="testingInput" bind:this={inputBinding} /> | ||
|
||
<img src="foo.jpg" /> | ||
|
||
<style lang="scss"> | ||
@use "sourcemapImport.scss"; | ||
@use "sass:color"; | ||
.sourcemap { | ||
$primary-color: #6b717f; | ||
color: $primary-color; | ||
border: 1px solid color.scale($primary-color, $lightness: 20%); | ||
} | ||
</style> |
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