From 598c8f8a31a6bf0cba10f93a17e6133a2479366d Mon Sep 17 00:00:00 2001 From: Todd Kloots Date: Fri, 12 Jun 2015 15:19:45 -0700 Subject: [PATCH] [fixed] Label test should require a label for placeholder anchors (resolves #68) [fixed] Label assertion errors if label is a number (resolves #67) --- lib/__tests__/index-test.js | 58 ++++++++++++++++++++++--------------- lib/assertions.js | 11 +++++-- 2 files changed, 42 insertions(+), 27 deletions(-) diff --git a/lib/__tests__/index-test.js b/lib/__tests__/index-test.js index 3b62e4f..a331954 100644 --- a/lib/__tests__/index-test.js +++ b/lib/__tests__/index-test.js @@ -183,7 +183,7 @@ describe('tags', () => { describe('placeholder links without href', () => { it('does not warn', () => { doNotExpectWarning(assertions.tags.a.HASH_HREF_NEEDS_BUTTON.msg, () => { - ; + ; }); }); }); @@ -191,7 +191,7 @@ describe('tags', () => { describe('placeholder links without tabindex', () => { it('does not warn', () => { doNotExpectWarning(assertions.tags.a.TABINDEX_NEEDS_BUTTON.msg, () => { - ; + ; }); }); }); @@ -199,7 +199,7 @@ describe('tags', () => { describe('with [href="#"]', () => { it('warns', () => { expectWarning(assertions.tags.a.HASH_HREF_NEEDS_BUTTON.msg, () => { - ; + ; }); }); }); @@ -207,7 +207,7 @@ describe('tags', () => { describe('with [tabIndex="0"] and no href', () => { it('warns', () => { expectWarning(assertions.tags.a.TABINDEX_NEEDS_BUTTON.msg, () => { - ; + ; }); }); }); @@ -215,7 +215,7 @@ describe('tags', () => { describe('with a real href', () => { it('does not warn', () => { doNotExpectWarning(assertions.tags.a.HASH_HREF_NEEDS_BUTTON.msg, () => { - ; + ; }); }); }); @@ -248,55 +248,67 @@ describe('labels', () => { it('warns if there is no label on an interactive element', () => { expectWarning(assertions.render.NO_LABEL.msg, () => { -