控制器功能:
controllerexample.js
function test() {
return "works!";
};
controllerexample_specs.js
it('test controllerexample function.', function() {
$ = Alloy.createController('controllerexample', {});
expect($.test).toEqual('works!');
});
当我运行脚本时,出现以下错误:
[ERROR] : . THERE WERE FAILURES!
[ERROR] : . ============================================================
[ERROR] : . Recap of failing specs:
[ERROR] : . ------------------------------------------------------------
[ERROR] : . controllerexample controller test controllerexample function.. - Expected Function to equal 'works!'