diff --git a/test/dartdoc_test.dart b/test/dartdoc_test.dart
index db2be45eba..0e405e8b79 100644
--- a/test/dartdoc_test.dart
+++ b/test/dartdoc_test.dart
@@ -365,8 +365,8 @@ void main() {
expect(meta.documentedWhere, equals(DocumentLocation.remote));
expect(
useSomethingInAnotherPackage.modelType.linkedName,
- startsWith(
- 'Required'));
+ matches(
+ 'Required'));
RegExp stringLink = new RegExp(
'https://api.dartlang.org/(dev|stable|edge|be)/${Platform.version.split(' ').first}/dart-core/String-class.html">String');
expect(useSomethingInTheSdk.modelType.linkedName, contains(stringLink));