Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit f84c28d

Browse files
committed
include test that extensions are preserved
1 parent e832e5e commit f84c28d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/parser_test.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,16 @@ main() {
342342
expect(mapping.toJson(), equals(SOURCE_MAP_BUNDLE));
343343
});
344344

345+
test('parse extensions', () {
346+
var map = new Map.from(EXPECTED_MAP);
347+
map["x_foo"] = "a";
348+
map["x_bar"] = [3];
349+
SingleMapping mapping = parseJson(map);
350+
expect(mapping.toJson(), equals(map));
351+
expect(mapping.extensions["x_foo"], equals("a"));
352+
expect(mapping.extensions["x_bar"].first, equals(3));
353+
});
354+
345355
group("source files", () {
346356
group("from fromEntries()", () {
347357
test("are null for non-FileLocations", () {

0 commit comments

Comments
 (0)