{"action":"created","issue":{"url":"https://api.github.com/repos/bearcatjs/bearcat/issues/131","labels_url":"https://api.github.com/repos/bearcatjs/bearcat/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/bearcatjs/bearcat/issues/131/comments","events_url":"https://api.github.com/repos/bearcatjs/bearcat/issues/131/events","html_url":"https://github.com/bearcatjs/bearcat/issues/131","id":57583337,"number":131,"title":"All testcase based on bearcat fail after updating from 0.2.37 to 0.3.15","user":{"login":"zj8487","id":5138447,"avatar_url":"https://avatars.githubusercontent.com/u/5138447?v=3","gravatar_id":"","url":"https://api.github.com/users/zj8487","html_url":"https://github.com/zj8487","followers_url":"https://api.github.com/users/zj8487/followers","following_url":"https://api.github.com/users/zj8487/following{/other_user}","gists_url":"https://api.github.com/users/zj8487/gists{/gist_id}","starred_url":"https://api.github.com/users/zj8487/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zj8487/subscriptions","organizations_url":"https://api.github.com/users/zj8487/orgs","repos_url":"https://api.github.com/users/zj8487/repos","events_url":"https://api.github.com/users/zj8487/events{/privacy}","received_events_url":"https://api.github.com/users/zj8487/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":39,"created_at":"2015-02-13T10:35:08Z","updated_at":"2015-02-13T14:54:28Z","closed_at":null,"body":"***All testcases say an error:***\r\n```\r\nTypeError: Cannot read property 'start' of undefined\r\n```\r\n***error is throw from bearcat.start() in every testcase file***\r\n```\r\n    before(function(done) {\r\n        bearcat.start(function() {\r\n            done();\r\n        });\r\n    });\r\n```\r\n\r\n\r\n***I noticed that the Bearcat.createApp has been changed***\r\n```\r\nBearcat.createApp = function(configLocations, opts) {\r\n\tif (this.state >= STATE_INITED) {\r\n\t\treturn;\r\n\t}\r\n```\r\n\r\n***I tried change the code as follow but it fails too.***\r\n```\r\nBearcat.createApp = function(configLocations, opts) {\r\n\tif (this.state >= STATE_INITED) {\r\n\t\treturn Bearcat;\r\n\t}\r\n```\r\n\r\n\r\n***you can use bearcat-dao to test after updating the bearcat***"},"comment":{"url":"https://api.github.com/repos/bearcatjs/bearcat/issues/comments/74265067","html_url":"https://github.com/bearcatjs/bearcat/issues/131#issuecomment-74265067","issue_url":"https://api.github.com/repos/bearcatjs/bearcat/issues/131","id":74265067,"user":{"login":"zj8487","id":5138447,"avatar_url":"https://avatars.githubusercontent.com/u/5138447?v=3","gravatar_id":"","url":"https://api.github.com/users/zj8487","html_url":"https://github.com/zj8487","followers_url":"https://api.github.com/users/zj8487/followers","following_url":"https://api.github.com/users/zj8487/following{/other_user}","gists_url":"https://api.github.com/users/zj8487/gists{/gist_id}","starred_url":"https://api.github.com/users/zj8487/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zj8487/subscriptions","organizations_url":"https://api.github.com/users/zj8487/orgs","repos_url":"https://api.github.com/users/zj8487/repos","events_url":"https://api.github.com/users/zj8487/events{/privacy}","received_events_url":"https://api.github.com/users/zj8487/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T14:54:28Z","updated_at":"2015-02-13T14:54:28Z","body":"@fantasyni 这样改有问题。\r\n这样改了后我如下代码不工作了，这个应该和库没关系。\r\n```\r\n\"use strict\";\r\n\r\n\r\nvar Shim = require(\"collections/shim\");\r\nvar array = require(\"collections/shim-array\");\r\nvar util = require('util');\r\n\r\n\r\nvar Type = function(value, name) {\r\n    this.value = Number(value);\r\n    this.name = String(name);\r\n};\r\n\r\nType.prototype.valueOf = function() {\r\n    return this.value;\r\n};\r\n\r\nType.prototype.toString = function() {\r\n    return util.format('[%s|%d]', this.name, this.value);\r\n};\r\n\r\n\r\nvar testObject = {\r\n    \"aa\": new Type(0, \"aa\"),\r\n    \"bb\": new Type(1, \"bb\"),\r\n    \"cc\": new Type(2, \"cc\"),\r\n    \"dd\": new Type(3, \"dd\"),\r\n    \"ee\": new Type(4, \"ee\"),\r\n    \"ff\": new Type(5, \"ff\"),\r\n    \"gg\": new Type(6, \"gg\"),\r\n    \"hh\": new Type(7, \"hh\"),\r\n    \"ii\": new Type(8, \"ii\"),\r\n    \"jj\": new Type(9, \"jj\"),\r\n    \"kk\": new Type(10, \"kk\"),\r\n};\r\n\r\n\r\nvar GGGGG = function() {\r\n    this.$id = \"ggggg\";\r\n\r\n    this.FUCK = testObject;\r\n    this.FUCK.sortedLists = Object.values(testObject).sort(Object.compare);\r\n    // 上面这行会报错。之前版本没问题。把这行移出去到外面也不报错。\r\n};\r\n\r\nmodule.exports = GGGGG;\r\n```\r\n\r\n相关库\r\nhttps://github.com/montagejs/collections"}}