{"action":"created","issue":{"url":"https://api.github.com/repos/da2k/curso-reactjs-ninja/issues/215","repository_url":"https://api.github.com/repos/da2k/curso-reactjs-ninja","labels_url":"https://api.github.com/repos/da2k/curso-reactjs-ninja/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/da2k/curso-reactjs-ninja/issues/215/comments","events_url":"https://api.github.com/repos/da2k/curso-reactjs-ninja/issues/215/events","html_url":"https://github.com/da2k/curso-reactjs-ninja/issues/215","id":373168941,"node_id":"MDU6SXNzdWUzNzMxNjg5NDE=","number":215,"title":"[M2#A10] - deep.equal do chai","user":{"login":"Roger-Melo","id":29297788,"node_id":"MDQ6VXNlcjI5Mjk3Nzg4","avatar_url":"https://avatars3.githubusercontent.com/u/29297788?v=4","gravatar_id":"","url":"https://api.github.com/users/Roger-Melo","html_url":"https://github.com/Roger-Melo","followers_url":"https://api.github.com/users/Roger-Melo/followers","following_url":"https://api.github.com/users/Roger-Melo/following{/other_user}","gists_url":"https://api.github.com/users/Roger-Melo/gists{/gist_id}","starred_url":"https://api.github.com/users/Roger-Melo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roger-Melo/subscriptions","organizations_url":"https://api.github.com/users/Roger-Melo/orgs","repos_url":"https://api.github.com/users/Roger-Melo/repos","events_url":"https://api.github.com/users/Roger-Melo/events{/privacy}","received_events_url":"https://api.github.com/users/Roger-Melo/received_events","type":"User","site_admin":false},"labels":[{"id":384373221,"node_id":"MDU6TGFiZWwzODQzNzMyMjE=","url":"https://api.github.com/repos/da2k/curso-reactjs-ninja/labels/question","name":"question","color":"fbca04","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-23T19:43:26Z","updated_at":"2018-10-23T21:51:47Z","closed_at":null,"author_association":"NONE","body":"Professor, gostaria de saber mais sobre o deep.equal. \r\n\r\nNo código abaixo, o que está sendo testado é se o valor retornado na função `map` é um valor do tipo array com 2 valores do tipo number e se não são a mesma referência de array?\r\n\r\nPorquê os dois valores do array são diferentes e o resultado do deep.equal ainda é `true`? \r\n\r\n```javascript\r\nit('map([1, 2], (item) => item + 1) should return [2, 3]', () => {\r\n  expect(map([1, 2], (item) => item + 1)).to.be.deep.equal([2, 3])\r\n})\r\n```\r\n\r\n<!-- Não apague daqui pra baixo! -->\r\n@fdaciuk\r\n"},"comment":{"url":"https://api.github.com/repos/da2k/curso-reactjs-ninja/issues/comments/432434405","html_url":"https://github.com/da2k/curso-reactjs-ninja/issues/215#issuecomment-432434405","issue_url":"https://api.github.com/repos/da2k/curso-reactjs-ninja/issues/215","id":432434405,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjQzNDQwNQ==","user":{"login":"fdaciuk","id":487669,"node_id":"MDQ6VXNlcjQ4NzY2OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/487669?v=4","gravatar_id":"","url":"https://api.github.com/users/fdaciuk","html_url":"https://github.com/fdaciuk","followers_url":"https://api.github.com/users/fdaciuk/followers","following_url":"https://api.github.com/users/fdaciuk/following{/other_user}","gists_url":"https://api.github.com/users/fdaciuk/gists{/gist_id}","starred_url":"https://api.github.com/users/fdaciuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdaciuk/subscriptions","organizations_url":"https://api.github.com/users/fdaciuk/orgs","repos_url":"https://api.github.com/users/fdaciuk/repos","events_url":"https://api.github.com/users/fdaciuk/events{/privacy}","received_events_url":"https://api.github.com/users/fdaciuk/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T21:51:47Z","updated_at":"2018-10-23T21:51:47Z","author_association":"MEMBER","body":"Oi @Roger-Melo! O `deep.equal` não testa a referência, mas testa os valores, de maneira \"profunda\" (deep) no objeto utilizado. No caso de arrays, ele vai testar se o valor e o índice do array correspondem. Para objetos, ele vai testar se as propriedades com o mesmo nome têm o mesmo valor. E se esse valor mais interno ainda for um objeto, ele continua iterando para não testar referências, apenas valores primitivos =)"}}
{"actor":{"display_login":"fdaciuk"}}