fix: RWD beta update remaining doctype first tests (#44996)

This commit is contained in:
Bruce B
2022-02-10 14:28:55 -08:00
committed by GitHub
parent 0f2246b750
commit fe3187a4d7
9 changed files with 26 additions and 14 deletions

View File

@ -49,10 +49,10 @@ Your `html` element should have a closing tag.
assert(code.match(/<\/html\s*>/gi)); assert(code.match(/<\/html\s*>/gi));
``` ```
Your `html` element should be below the `DOCTYPE` declaration. Your `DOCTYPE` declaration should be at the beginning of your HTML.
```js ```js
assert(code.match(/(?<!<html\s*>)<!DOCTYPE\s+html\s*>/gi)); assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i));
``` ```
# --seed-- # --seed--

View File

@ -47,10 +47,10 @@ Your `html` element should have a closing tag.
assert(code.match(/<\/html\s*>/)); assert(code.match(/<\/html\s*>/));
``` ```
Your `html` element should be below the `DOCTYPE` declaration. Your `DOCTYPE` declaration should be at the beginning of your HTML.
```js ```js
assert(code.match(/(?<!<html\s*>)<!DOCTYPE\s+html\s*>/gi)); assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i));
``` ```
You should have an opening `head` tag. You should have an opening `head` tag.

View File

@ -49,10 +49,10 @@ Your `html` element should have a closing tag.
assert(code.match(/<\/html\s*>/)); assert(code.match(/<\/html\s*>/));
``` ```
Your `html` element should be below the `DOCTYPE` declaration. Your `DOCTYPE` declaration should be at the beginning of your HTML.
```js ```js
assert(code.match(/(?<!<html\s*>)<!DOCTYPE\s+html\s*>/gi)); assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i));
``` ```
You should have an opening `head` tag. You should have an opening `head` tag.

View File

@ -35,6 +35,12 @@ You should close the `DOCTYPE` declaration with a `>` after the type.
assert(code.match(/html\s*>/gi)); assert(code.match(/html\s*>/gi));
``` ```
Your `DOCTYPE` declaration should be at the beginning of your HTML.
```js
assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i));
```
# --seed-- # --seed--
## --seed-contents-- ## --seed-contents--

View File

@ -11,10 +11,10 @@ Add opening and closing `html` tags below the `DOCTYPE` so you have a place to s
# --hints-- # --hints--
Your `html` element should be below the `DOCTYPE` declaration. Your `DOCTYPE` declaration should be at the beginning of your HTML.
```js ```js
assert(code.match(/(?<!<html\s*>)<!DOCTYPE\s+html\s*>/gi)); assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i));
``` ```
Your `html` element should have an opening tag. Your `html` element should have an opening tag.

View File

@ -35,6 +35,12 @@ You should close the `DOCTYPE` declaration with a `>` after the type.
assert(code.match(/html\s*>/gi)); assert(code.match(/html\s*>/gi));
``` ```
Your `DOCTYPE` declaration should be at the beginning of your HTML.
```js
assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i));
```
# --seed-- # --seed--
## --seed-contents-- ## --seed-contents--

View File

@ -11,10 +11,10 @@ Add opening and closing `html` tags below the `DOCTYPE` so you have a place to s
# --hints-- # --hints--
Your `html` element should be below the `DOCTYPE` declaration. Your `DOCTYPE` declaration should be at the beginning of your HTML.
```js ```js
assert(code.match(/(?<!<html\s*>)<!DOCTYPE\s+html\s*>/gi)); assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i));
``` ```
Your `html` element should have an opening tag. Your `html` element should have an opening tag.

View File

@ -35,10 +35,10 @@ You should close the `DOCTYPE` declaration with a `>` after the type.
assert(code.match(/html\s*>/gi)); assert(code.match(/html\s*>/gi));
``` ```
Your `html` element should be below the `DOCTYPE` declaration. Your `DOCTYPE` declaration should be at the beginning of your HTML.
```js ```js
assert(code.match(/(?<!<html\s*>)<!DOCTYPE\s+html\s*>/gi)); assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i));
``` ```
Your `html` element should have an opening tag. Your `html` element should have an opening tag.

View File

@ -47,10 +47,10 @@ Your `html` element should have a closing tag.
assert(code.match(/<\/html\s*>/)); assert(code.match(/<\/html\s*>/));
``` ```
Your `html` element should be below the `DOCTYPE` declaration. Your `DOCTYPE` declaration should be at the beginning of your HTML.
```js ```js
assert(code.match(/(?<!<html\s*>)<!DOCTYPE\s+html\s*>/gi)); assert(__helpers.removeHtmlComments(code).match(/^\s*<!DOCTYPE\s+html\s*>/i));
``` ```
You should have an opening `head` tag. You should have an opening `head` tag.