Skip to content

Commit ab6ef84

Browse files
committed
fix tests
1 parent 38895dd commit ab6ef84

File tree

1 file changed

+14
-23
lines changed

1 file changed

+14
-23
lines changed

test/model_test.dart

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,11 @@ void main() {
225225
});
226226

227227
test('codeifies a class from the SDK', () {
228-
expect(docsAsHtml,
229-
contains('<code class="prettyprint lang-dart">String</code>'));
228+
expect(docsAsHtml, contains('<code>String</code>'));
230229
});
231230

232231
test('codeifies a reference to its parameter', () {
233-
expect(docsAsHtml,
234-
contains('<code class="prettyprint lang-dart">value</code>'));
232+
expect(docsAsHtml, contains('<code>value</code>'));
235233
});
236234

237235
test('links to a reference to its class', () {
@@ -292,9 +290,7 @@ void main() {
292290
// track when the behavior changes
293291
test('codeifies a prefixed top-level variable an imported lib', () {
294292
expect(
295-
docsAsHtml,
296-
contains(
297-
'<code class="prettyprint lang-dart">css.theOnlyThingInTheLibrary</code>'));
293+
docsAsHtml, contains('<code>css.theOnlyThingInTheLibrary</code>'));
298294
});
299295

300296
test('links to a name with a single underscore', () {
@@ -325,7 +321,7 @@ void main() {
325321
expect(
326322
add.oneLineDoc,
327323
equals(
328-
'Adds <code class="prettyprint lang-dart">value</code> to the end of this list,\nextending the length by one.'));
324+
'Adds <code>value</code> to the end of this list,\nextending the length by one.'));
329325
});
330326

331327
test(
@@ -336,17 +332,17 @@ void main() {
336332
expect(
337333
add.documentationAsHtml,
338334
startsWith(
339-
'<p>Adds <code class="prettyprint lang-dart">value</code> to the end of this list,\nextending the length by one.'));
335+
'<p>Adds <code>value</code> to the end of this list,\nextending the length by one.'));
340336
});
341337

342338
test('incorrect doc references are still wrapped in code blocks', () {
343339
expect(incorrectReference.documentationAsHtml,
344-
'<p>This should <code class="prettyprint lang-dart">not work</code>.</p>');
340+
'<p>This should <code>not work</code>.</p>');
345341
});
346342

347343
test('no references', () {
348-
expect(Apple.documentationAsHtml,
349-
'<p>Sample class <code class="prettyprint lang-dart">String</code></p>');
344+
expect(
345+
Apple.documentationAsHtml, '<p>Sample class <code>String</code></p>');
350346
});
351347

352348
test('single ref to class', () {
@@ -358,7 +354,7 @@ void main() {
358354
expect(
359355
thisIsAsync.documentationAsHtml,
360356
equals(
361-
'<p>An async function. It should look like I return a <code class="prettyprint lang-dart">Future</code>.</p>'));
357+
'<p>An async function. It should look like I return a <code>Future</code>.</p>'));
362358
});
363359

364360
test('references are correct in exported libraries', () {
@@ -368,10 +364,7 @@ void main() {
368364
expect(resolved, isNotNull);
369365
expect(resolved,
370366
contains('<a href="two_exports/BaseClass-class.html">BaseClass</a>'));
371-
expect(
372-
resolved,
373-
contains(
374-
'linking over to <code class="prettyprint lang-dart">Apple</code>.'));
367+
expect(resolved, contains('linking over to <code>Apple</code>.'));
375368
});
376369

377370
test('references to class and constructors', () {
@@ -403,16 +396,14 @@ void main() {
403396
expect(
404397
testingCodeSyntaxInOneLiners.oneLineDoc,
405398
equals(
406-
'These are code syntaxes: <code class="prettyprint lang-dart">true</code> and <code class="prettyprint lang-dart">false</code>'));
399+
'These are code syntaxes: <code>true</code> and <code>false</code>'));
407400
});
408401

409402
test('doc comments to parameters are marked as code', () {
410403
Method localMethod = subForDocComments.instanceMethods
411404
.firstWhere((m) => m.name == 'localMethod');
412-
expect(localMethod.documentationAsHtml,
413-
contains('<code class="prettyprint lang-dart">foo</code>'));
414-
expect(localMethod.documentationAsHtml,
415-
contains('<code class="prettyprint lang-dart">bar</code>'));
405+
expect(localMethod.documentationAsHtml, contains('<code>foo</code>'));
406+
expect(localMethod.documentationAsHtml, contains('<code>bar</code>'));
416407
});
417408
});
418409

@@ -668,7 +659,7 @@ void main() {
668659
expect(
669660
thisIsAsync.documentationAsHtml,
670661
equals(
671-
'<p>An async function. It should look like I return a <code class="prettyprint lang-dart">Future</code>.</p>'));
662+
'<p>An async function. It should look like I return a <code>Future</code>.</p>'));
672663
});
673664

674665
test('docs do not lose brackets in code blocks', () {

0 commit comments

Comments
 (0)