{"action":"opened","issue":{"url":"https://api.github.com/repos/avajs/ava/issues/845","repository_url":"https://api.github.com/repos/avajs/ava","labels_url":"https://api.github.com/repos/avajs/ava/issues/845/labels{/name}","comments_url":"https://api.github.com/repos/avajs/ava/issues/845/comments","events_url":"https://api.github.com/repos/avajs/ava/issues/845/events","html_url":"https://github.com/avajs/ava/issues/845","id":155863658,"number":845,"title":"An assertion that just compares specific items in the tree.","user":{"login":"jamestalmage","id":4082216,"avatar_url":"https://avatars.githubusercontent.com/u/4082216?v=3","gravatar_id":"","url":"https://api.github.com/users/jamestalmage","html_url":"https://github.com/jamestalmage","followers_url":"https://api.github.com/users/jamestalmage/followers","following_url":"https://api.github.com/users/jamestalmage/following{/other_user}","gists_url":"https://api.github.com/users/jamestalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/jamestalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamestalmage/subscriptions","organizations_url":"https://api.github.com/users/jamestalmage/orgs","repos_url":"https://api.github.com/users/jamestalmage/repos","events_url":"https://api.github.com/users/jamestalmage/events{/privacy}","received_events_url":"https://api.github.com/users/jamestalmage/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-20T00:20:18Z","updated_at":"2016-05-20T00:20:18Z","closed_at":null,"body":"This would be especially handy for AST type tests.\r\n\r\nConsider the following\r\n\r\n```js\r\nconst ast = {\r\n  loc: ... // I usually don't care about this.\r\n  start: ... // or this\r\n  end: ... // or this\r\n  type: 'MemberExpression', // usually I DO care about this\r\n  object: {\r\n     // maybe I care about the contents of this, maybe I don't\r\n  },\r\n  property: {\r\n    // again, maybe\r\n  }\r\n};\r\n```\r\n\r\nIt would be nice to have a sort of \"`deepStrictEqual` but only for the portion of the graph I specify\"\r\n\r\nI am going to use `t.like`:\r\n\r\n```js\r\nt.like(ast, {\r\n  type: 'MemberExpression',\r\n  object: {\r\n    type: 'Identifier',\r\n    name: 'foo'\r\n  }\r\n});\r\n```\r\n\r\nIn the above, I'm basically saying \"I want to verify it's a `MemberExpression` Node, whose `object` property is an `Identifier` with name `foo`\". `loc`, `start`, `end` are ignored throughout, as is the `property` property."}}
{"actor":{"display_login":"jamestalmage"}}