"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/node_api/source_map_test.dart" between
dart-sass-1.24.3.tar.gz and dart-sass-1.24.4.tar.gz

About: Dart Sass (Syntactically Awesome StyleSheets) is a CSS preprocessor (extension language), written in Dart, that adds "power and elegance" to the basic CSS language. There exist also LibSass, a Sass implementation written in C++. The original Ruby implementation of Sass reached its end of life as of 26 March 2019.

source_map_test.dart  (dart-sass-1.24.3):source_map_test.dart  (dart-sass-1.24.4)
skipping to change at line 198 skipping to change at line 198
containsPair( containsPair(
"file", p.toUri(p.join(sandbox, "test.css")).toString())); "file", p.toUri(p.join(sandbox, "test.css")).toString()));
}); });
test("derives the target URL from stdin", () { test("derives the target URL from stdin", () {
var result = sass.renderSync( var result = sass.renderSync(
RenderOptions(data: "a {b: c}", sourceMap: "out.css.map")); RenderOptions(data: "a {b: c}", sourceMap: "out.css.map"));
var map = _jsonUtf8.decode(result.map) as Map<String, Object>; var map = _jsonUtf8.decode(result.map) as Map<String, Object>;
expect(map, containsPair("file", "stdin.css")); expect(map, containsPair("file", "stdin.css"));
}); });
// Regression test for sass/dart-sass#922
test("contains a URL handled by an importer when sourceMap is absolute",
() {
var map = _renderSourceMap(RenderOptions(
data: '''
@import "other";
a {b: c}
''',
importer: allowInterop(
(void _, void __) => NodeImporterResult(contents: 'x {y: z}')),
sourceMap: p.absolute("out.css.map"),
outFile: 'out.css'));
expect(map, containsPair("sources", ["other", "stdin"]));
});
}); });
test("with omitSourceMapUrl, doesn't include a source map comment", () { test("with omitSourceMapUrl, doesn't include a source map comment", () {
var result = sass.renderSync(RenderOptions( var result = sass.renderSync(RenderOptions(
data: "a {b: c}", data: "a {b: c}",
sourceMap: true, sourceMap: true,
outFile: "out.css", outFile: "out.css",
omitSourceMapUrl: true)); omitSourceMapUrl: true));
expect(result.map, isNotNull); expect(result.map, isNotNull);
expect(utf8.decode(result.css), isNot(contains("/*#"))); expect(utf8.decode(result.css), isNot(contains("/*#")));
 End of changes. 1 change blocks. 
0 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)