资源描述:
《[JavaScript.Testing.with.Jasmine(2013.3)].Evan.Hahn.文字版(1)》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、JavaScriptTestingwithJasmineEvanHahnJavaScriptTestingwithJasminebyEvanHahnCopyright©2013EvanHahn.Allrightsreserved.PrintedintheUnitedStatesofAmerica.PublishedbyO’ReillyMedia,Inc.,1005GravensteinHighwayNorth,Sebastopol,CA95472.O’Reillybooksmaybepurchasedforeducational,busines
2、s,orsalespromotionaluse.Onlineeditionsarealsoavailableformosttitles(http://my.safaribooksonline.com).Formoreinformation,contactourcorporate/institutionalsalesdepartment:800-998-9938orcorporate@oreilly.com.Editor:MaryTreselerCoverDesigner:KarenMontgomeryProductionEditor:Maris
3、aLaFleurInteriorDesigner:DavidFutatoProofreader:RachelMonaghanIllustrator:RebeccaDemarestMarch2013:FirstEditionRevisionHistoryfortheFirstEdition:2013-03-22:FirstreleaseSeehttp://oreilly.com/catalog/errata.csp?isbn=9781449356378forreleasedetails.NutshellHandbook,theNutshellHa
4、ndbooklogo,andtheO’ReillylogoareregisteredtrademarksofO’ReillyMedia,Inc._JavaScriptTestingwithJasmine_,theimageofaphoebe,andrelatedtradedressaretrademarksofO’ReillyMedia,Inc.Manyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarks.Wh
5、erethosedesignationsappearinthisbook,andO’ReillyMedia,Inc.,wasawareofatrade‐markclaim,thedesignationshavebeenprintedincapsorinitialcaps.Whileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorassumenoresponsibilityforerrorsoromissions,orfordamagesresu
6、ltingfromtheuseoftheinformationcontainedherein.ISBN:978-1-449-35637-8[LSI]TableofContentsPreface........................................................................v1.IntrotoTesting..............................................................1WhatIsSoftwareTesting?1WhyI
7、sItUseful?2Test-DrivenDevelopment2Behavior-DrivenDevelopment22.Jasmine....................................................................5WhatIsJasmine?5GettingSetUpwithJasmine5TestingExistingCodewithdescribe,it,andexpect6AnExampletoTest6JasmineTime!7Matchers8WritingtheTest
8、sFirstwithTest-DrivenDevelopment93.WritingGoodTests........................