Skip to content

Commit

Permalink
fixup! feat!: rework TD @context handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed May 18, 2024
1 parent 45586a4 commit ab8b4f8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/core/context_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,21 @@ void main() {
);
});
});

test("be supported when including both the TD 1.0 and 1.1 URL", () {
const tdVersion11ContextUrl = "https://www.w3.org/2022/wot/td/v1.1";

final tdVersion10ContextEntry =
SingleContextEntry.fromString("https://www.w3.org/2019/wot/td/v1");

final tdVersion11ContextEntry =
SingleContextEntry.fromString(tdVersion11ContextUrl);

expect(
Context([tdVersion10ContextEntry, tdVersion11ContextEntry])
.prefixMapping
.defaultPrefixValue,
tdVersion11ContextUrl,
);
});
}

0 comments on commit ab8b4f8

Please sign in to comment.