2.0 KiB
2.0 KiB
id, title, localeTitle, challengeType
id | title | localeTitle | challengeType |
---|---|---|---|
587d7fb4367417b2b2512c00 | Expand Your Project with External Packages from npm | Expanda su proyecto con paquetes externos desde npm | 2 |
Description
"dependencies": {
"package-name": "version",
"express": "4.14.0"
}
Instrucciones
Agregue la versión 2.14.0 del momento del paquete al campo de dependencias de su paquete.json
Moment es una biblioteca útil para trabajar con la hora y las fechas.
Instructions
Tests
tests:
- text: '"dependencias" debe incluir "momento"'
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/_api/package.json'').then(data => { var packJson = JSON.parse(data); assert.property(packJson.dependencies, ''moment'', ''"dependencies" does not include "moment"''); }, xhr => { throw new Error(xhr.responseText); })'
- text: La versión "moment" debería ser "2.14.0" '
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/_api/package.json'').then(data => { var packJson = JSON.parse(data); assert.match(packJson.dependencies.moment, /^[\^\~]?2\.14\.0/, ''Wrong version of "moment" installed. It should be 2.14.0''); }, xhr => { throw new Error(xhr.responseText); })'
Challenge Seed
Solution
// solution required