{"action":"opened","issue":{"url":"https://api.github.com/repos/sass/sass-spec/issues/1001","repository_url":"https://api.github.com/repos/sass/sass-spec","labels_url":"https://api.github.com/repos/sass/sass-spec/issues/1001/labels{/name}","comments_url":"https://api.github.com/repos/sass/sass-spec/issues/1001/comments","events_url":"https://api.github.com/repos/sass/sass-spec/issues/1001/events","html_url":"https://github.com/sass/sass-spec/issues/1001","id":194879764,"number":1001,"title":"Add specs for built-in functions","user":{"login":"nex3","id":188,"avatar_url":"https://avatars.githubusercontent.com/u/188?v=3","gravatar_id":"","url":"https://api.github.com/users/nex3","html_url":"https://github.com/nex3","followers_url":"https://api.github.com/users/nex3/followers","following_url":"https://api.github.com/users/nex3/following{/other_user}","gists_url":"https://api.github.com/users/nex3/gists{/gist_id}","starred_url":"https://api.github.com/users/nex3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nex3/subscriptions","organizations_url":"https://api.github.com/users/nex3/orgs","repos_url":"https://api.github.com/users/nex3/repos","events_url":"https://api.github.com/users/nex3/events{/privacy}","received_events_url":"https://api.github.com/users/nex3/received_events","type":"User","site_admin":false},"labels":[{"id":498946399,"url":"https://api.github.com/repos/sass/sass-spec/labels/specs%20to%20add","name":"specs to add","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-12T02:48:27Z","updated_at":"2016-12-12T02:48:27Z","closed_at":null,"body":"All the built-in functions need thorough specs that exercise their edge and error cases. There isn't currently a great structure in place for this; some functions have some specs scattered around the repo, but there should be a uniform location and we should make sure *all* functions are tested.\r\n\r\nRuby Sass has [good test coverage for functions](https://github.com/sass/sass/blob/stable/test/sass/functions_test.rb), so the best way to go about this is probably porting those. I suggest the following structure:\r\n\r\n```\r\nspec/\r\n'-- functions/\r\n    |-- color/\r\n    | ...\r\n    '-- number/\r\n        |-- round/\r\n        | ...\r\n        '-- max/\r\n            |-- success/\r\n            |   |-- input.scss\r\n            |   '-- expected_output.scss\r\n            '-- error/\r\n                |-- type_error_arg1/\r\n                |   |-- input.scss\r\n                |   '-- expected_output.scss\r\n                '-- type_error_arg2/\r\n                    |-- input.scss\r\n                    '-- expected_output.scss\r\n```\r\n\r\nFor functions with more complex modes of operation, we could replace `success/` with multiple test cases."}}
{"actor":{"display_login":"nex3"}}