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/sourcemap-basename/test.js

16 lines
554 B

import { component_filepath, component_file_basename, external_relative_filename } from './_config';
export function test({ assert, preprocessed }) {
assert.notEqual(
preprocessed.locate(`/* Filename from preprocess: ${component_filepath} */`),
undefined,
'Preprocessor should receive same value for filename as passed to preprocess function'
);
assert.deepEqual(
preprocessed.map.sources.slice().sort(),
[external_relative_filename, component_file_basename].sort(),
'Preprocessed map should contain sources relative to filepath'
);
}