37 describe('hello',function(){
38 describe('#selfFunction',function(){
39 it("should be test even if it's private",function(){
40 var rewireFunction = rewire('./private.js')
41 console.log('rewireFunction is',rewireFunction);
42 var privateFunction = rewireFunction._get_('selfFunction');
43 chai.expect(privateFunction(2)).equal(3);
44 })
45 })
46 })
如上所示代码,为什么总告诉我 _get_
方法不存在呢?我引入了 rewire 模块了啊
应该是 set 和 get