From 79d933597724524e4262ee6b6ee89fb2c74f0bd6 Mon Sep 17 00:00:00 2001 From: Anh Tran Date: Tue, 30 Jan 2018 00:39:39 -0500 Subject: [PATCH] fix(seed): Add test cases for closing tags (#16575) --- .../applied-accessibility.json | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/seed/challenges/01-responsive-web-design/applied-accessibility.json b/seed/challenges/01-responsive-web-design/applied-accessibility.json index 08af058ec2..78beabc093 100644 --- a/seed/challenges/01-responsive-web-design/applied-accessibility.json +++ b/seed/challenges/01-responsive-web-design/applied-accessibility.json @@ -256,7 +256,8 @@ "tests": [ "assert($('header').length == 1, 'message: Your code should have one header tag.');", "assert($('header').children('h1').length == 1, 'message: Your header tags should wrap around the h1.');", - "assert($('div').length == 0, 'message: Your code should not have any div tags.');" + "assert($('div').length == 0, 'message: Your code should not have any div tags.');", + "assert(code.match(/<\\/header>/g) && code.match(/<\\/header>/g).length === code.match(/
/g).length, 'message: Make sure your header element has a closing tag.');" ], "solutions": [], "hints": [], @@ -310,7 +311,8 @@ "tests": [ "assert($('nav').length == 1, 'message: Your code should have one nav tag.');", "assert($('nav').children('ul').length == 1, 'message: Your nav tags should wrap around the ul and its list items.');", - "assert($('div').length == 0, 'message: Your code should not have any div tags.');" + "assert($('div').length == 0, 'message: Your code should not have any div tags.');", + "assert(code.match(/<\\/nav>/g) && code.match(/<\\/nav>/g).length === code.match(/