0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00
svelte/test/sourcemaps/samples/css/test.js

18 lines
400 B
JavaScript

export function test ({ assert, smcCss, locateInSource, locateInGeneratedCss }) {
const expected = locateInSource( '.foo' );
const start = locateInGeneratedCss( '.foo' );
const actual = smcCss.originalPositionFor({
line: start.line + 1,
column: start.column
});
assert.deepEqual( actual, {
source: 'input.html',
name: null,
line: expected.line + 1,
column: expected.column
});
}