Fix test case so only the word submit can pass test
This commit is contained in:
@ -32,8 +32,8 @@
|
|||||||
"¡Bienvenido/a al primer desafío de programación de Free Code Camp!",
|
"¡Bienvenido/a al primer desafío de programación de Free Code Camp!",
|
||||||
"Puedes editar tu <code>código</code> en tu <code>editor de texto</code>, que hemos incrustado en esta página web.",
|
"Puedes editar tu <code>código</code> en tu <code>editor de texto</code>, que hemos incrustado en esta página web.",
|
||||||
"¿Ves el código en tu editor de texto que dice <code><h1>Hello</h1></code>? Ese es un <code>elemento</code> HTML.",
|
"¿Ves el código en tu editor de texto que dice <code><h1>Hello</h1></code>? Ese es un <code>elemento</code> HTML.",
|
||||||
"La mayoría de los elementos HTML tienen una <code>etiqueta de apertura</code> y una <code>etiqueta de cierre</code>.",
|
"La mayoría de los elementos HTML tienen una <code>etiqueta de apertura</code> y una <code>etiqueta de cierre</code>.",
|
||||||
"Las etiquetas de apertura se ven como:",
|
"Las etiquetas de apertura se ven como:",
|
||||||
"<code><h1></code>",
|
"<code><h1></code>",
|
||||||
" Las etiquetas de cierre se ven como:",
|
" Las etiquetas de cierre se ven como:",
|
||||||
"<code></h1></code>",
|
"<code></h1></code>",
|
||||||
@ -1765,7 +1765,7 @@
|
|||||||
"tests": [
|
"tests": [
|
||||||
"assert($(\"form\").children(\"button\").length > 0, 'message: Your form should have a button inside it.');",
|
"assert($(\"form\").children(\"button\").length > 0, 'message: Your form should have a button inside it.');",
|
||||||
"assert($(\"button\").attr(\"type\") === \"submit\", 'message: Your submit button should have the attribute <code>type</code> set to <code>submit</code>.');",
|
"assert($(\"button\").attr(\"type\") === \"submit\", 'message: Your submit button should have the attribute <code>type</code> set to <code>submit</code>.');",
|
||||||
"assert($(\"button\").text().match(/submit/gi), 'message: Your submit button should have the text \"Submit\".');",
|
"assert($(\"button\").text().match(/^\\s*submit\\s*$/gi), 'message: Your submit button should only have the text \"Submit\".');",
|
||||||
"assert(code.match(/<\\/button>/g) && code.match(/<button/g) && code.match(/<\\/button>/g).length === code.match(/<button/g).length, 'message: Make sure your <code>button</code> element has a closing tag.');"
|
"assert(code.match(/<\\/button>/g) && code.match(/<button/g) && code.match(/<\\/button>/g).length === code.match(/<button/g).length, 'message: Make sure your <code>button</code> element has a closing tag.');"
|
||||||
],
|
],
|
||||||
"challengeType": 0,
|
"challengeType": 0,
|
||||||
|
Reference in New Issue
Block a user