From 9c3de2df24bdbdb19454d56c49e660f4783d0cc9 Mon Sep 17 00:00:00 2001 From: tomki1 <38170380+tomki1@users.noreply.github.com> Date: Sun, 30 Aug 2020 20:13:30 -0700 Subject: [PATCH] added test to assert h1 is before h2 (#39040) --- .../headline-with-the-h2-element.english.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/headline-with-the-h2-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/headline-with-the-h2-element.english.md index 5ec92b8ca1..fbd4ff7188 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/headline-with-the-h2-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/headline-with-the-h2-element.english.md @@ -32,6 +32,8 @@ tests: testString: assert.isTrue((/cat(\s)?photo(\s)?app/gi).test($("h2").text())); - text: Your h1 element should have the text "Hello World". testString: assert.isTrue((/hello(\s)+world/gi).test($("h1").text())); + - text: Your h1 element should be before your h2 element. + testString: assert(code.match(/

\s*?.*?\s*?<\/h1>\s*

\s*?.*?\s*?<\/h2>/gi)); ```