You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/sourcemaps/samples/each-block/test.js

19 lines
467 B

export function test({ assert, code, smc, map, locateInSource, locateInGenerated }) {
7 years ago
const startIndex = code.indexOf('create_main_fragment');
7 years ago
const expected = locateInSource('each');
const start = locateInGenerated('length', startIndex);
const actual = smc.originalPositionFor({
line: start.line + 1,
column: start.column
});
assert.deepEqual(actual, {
6 years ago
source: 'input.svelte',
name: null,
line: expected.line + 1,
column: expected.column
});
}