?????????????????????5??js?????1??css?????
????jasmine.js : jasmine????????????
????jasmine-html.js : ???????????????js?????
????boot.js : jasmine???????????????????????????????????????jasmine.js??????????
????src.js : ????????????????
????test.js : jasmine????????
????jasmine.css :???????????????????????
??????????????src.js?????????????????showName?????
????function showName(name){
????return 'my name is '+name;
????}
??????????test.js????в????????д??

 

describe('just a test'??function(){
it('test showName'??function(){
var a='ck';
var exp='my name is ck';
expect(exp).toEqual(showName(a));
});
});

???????????????test.html???????????£?
????????????????????????????
???????????test.js???
????var exp='my name is mm';
???????????test.html????????????£?
???????????jasmine????????????????????
????????????????????????????????jasmine?????е????????????????
????5??API
????describe(string??function)
????????????????????????
????string:??????????
????function:?????麯??
????It(string??function)
???????????specs??????????????
????string:spces??????
????function:spces????
????beforeEach(function)
?????????????describe??????it???????????
????afterEach(function)
?????????????describe??????it??к????????
????toBe
?????????===????????
????toEqual
????????????????飬??????
????toMatch
???????????????????
????toBeDefined
?????????????????
????toBeUndefined
???????δ????
????toBeNull
???????null
????toBeTruthy
??????????????????????true
????toBeFalsy
??????????????????????false
????toContain
???????????????????????????????????飬???????????
????toBeLessThan
???????????С??
????toBeGreaterThan
???????????????
????toBeCloseTo
??????????????徫??????????????????
????toThrow
?????????????????????????????

 

it("toThrow?????????????????????????"?? function() {
var foo = function() {
return 1 + 2;
};
var bar = function() {
return a + 1;
};
expect(foo).not.toThrow();
expect(bar).toThrow();
});

????jasmine?л??????????spy?????????????????????????????????漰???????????????????????????????????????????о???????????????????????????????