mirror of https://github.com/sveltejs/svelte
parent
5e8a25fe65
commit
695cfd01c9
@ -1,7 +1,16 @@
|
|||||||
export function test ( assert, code, map, smc, locator ) {
|
export function test ({ assert, smc, locateInSource, locateInGenerated }) {
|
||||||
console.log( `code`, code )
|
const expected = locateInSource( 'foo.bar.baz' );
|
||||||
console.log( `map`, map )
|
const loc = locateInGenerated( 'foo.bar.baz' );
|
||||||
|
|
||||||
let loc = locator( 'foo.bar.baz' );
|
const actual = smc.originalPositionFor({
|
||||||
console.log( `loc`, loc )
|
line: loc.line + 1,
|
||||||
|
column: loc.column
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.deepEqual( actual, {
|
||||||
|
source: 'SvelteComponent.html',
|
||||||
|
name: null,
|
||||||
|
line: expected.line,
|
||||||
|
column: expected.column
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue