1.4 KiB
1.4 KiB
id, title, localeTitle, challengeType
id | title | localeTitle | challengeType |
---|---|---|---|
587d7fb7367417b2b2512c0d | Use model.findById() to Search Your Database By _id | Use model.findById () para pesquisar seu banco de dados por _id | 2 |
Description
Instructions
Tests
tests:
- text: Encontrar um item por Id deve ter sucesso
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/_api/find-by-id'').then(data => { assert.equal(data.name, ''test'', ''item.name is not what expected''); assert.equal(data.age, 0, ''item.age is not what expected''); assert.deepEqual(data.favoriteFoods, [''none''], ''item.favoriteFoods is not what expected''); assert.equal(data.__v, 0, ''The item should be not previously edited''); }, xhr => { throw new Error(xhr.responseText); })'
Challenge Seed
Solution
// solution required