1.8 KiB
1.8 KiB
id, title, localeTitle, challengeType
id | title | localeTitle | challengeType |
---|---|---|---|
587d7fb4367417b2b2512bfd | Add Keywords to Your package.json | Añadir palabras clave a su package.json | 2 |
Description
"keywords": [ "descriptive", "related", "words" ],
Como puede ver, este campo está estructurado como una matriz de cadenas entre comillas dobles.
Instrucciones
Agregue una serie de cadenas adecuadas al campo de palabras clave en el paquete.json de su proyecto de Glitch.
Una de las palabras clave debe ser freecodecamp.
Instructions
Tests
tests:
- text: package.json debe tener una clave de "palabras clave" válida
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/_api/package.json'').then(data => { var packJson = JSON.parse(data); assert(packJson.keywords, ''"keywords" is missing''); }, xhr => { throw new Error(xhr.responseText); })'
- text: El campo "palabras clave" debería ser una matriz "
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/_api/package.json'').then(data => { var packJson = JSON.parse(data); assert.isArray(packJson.keywords, ''"keywords" is not an array''); }, xhr => { throw new Error(xhr.responseText); })'
- text: '"palabras clave" debe incluir "freecodecamp"'
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/_api/package.json'').then(data => { var packJson = JSON.parse(data); assert.include(packJson.keywords, ''freecodecamp'', ''"keywords" does not include "freecodecamp"''); }, xhr => { throw new Error(xhr.responseText); })'
Challenge Seed
Solution
// solution required