SlideShare a Scribd company logo
Mocha,  Chai  and  Sinon  
                @adstage                @adstage
Andrew  Dixon  
andrew@adstage.io
               @adstage
Senior  So(ware  Engineer  at  AdStage  
Has  been  launching  companies  since  the  last  
millennium.  Worked  on  everything  from  the  
Linux  Kernel  to  AmbiBous  SPAs  with  Ember.
Andrew
Dixon
RAISED
AdStage  All-­‐In-­‐One  Ad  PlaHorm  
Build,  deploy  &  manage  ad  campaigns  
across  Google,  Bing,  Facebook,  TwiOer  &  
LinkedIn.  
                @adstage
“The only thing we know about the future is that it
will be different.”
-­‐  Peter  Drucker
                @adstage
Cassandra
Rails
Postgres
Pros  
*  Stable  -­‐  first  release  in  2008  
*  Large  Community  
*  IntegraBons  
Cons  
  *  Syntax      
  *  ConfiguraBon  
        (e.g.  asserBon  libraries)  
  *  Asynchronous  TesBng    
  *  Headless  Run  Support  
Pros  
*  NodeJS  NaBve  
      (i.e.  headless  out  of  the  box)  
*  ExcepBon  on  Failure  
      (only  req.  for  asserBon  lib)  
*  Asynchronous  TesBng
Cons  
*  Support  
      (i.e.  no  Ember  happy  path)  
*  IntegraBons  
Sandbox  
*  Great  for  OrganizaBon  
*  Call  `restore()`  Once
Spies  
*  Records  arguments,  
      return  values  and  
      excepBons  
*  Wrap  ExisBng  
      or  Anonymous  
*  Maintains  Behavior
Stubs  
*  Spies  with  Defined  
      Behavior  
*  Does  Not  Call  
      ExisBng  FuncBon  
*  Useful  for  Forcing  
      Errors
Mocks  
*  Stubs  with  Defined  
      ExpectaBons  
*  Use  Only  for  Method  
      Under  Test
How  is  AdStage  Tes6ng?
• Makefile  to  run  
specs  with  NodeJS  
• HBS  Compiled  to  JS  
• jsDOM  
• RequireJS  to  load  
only  the  components  
being  tested
How  is  AdStage  Tes6ng?
• Makefile  to  run  
specs  with  NodeJS  
• HBS  Compiled  to  JS  
• jsDOM  
• RequireJS  to  load  
only  the  components  
being  tested
What  About  Ember-­‐CLI?
• InstallaBon  is  Stupid  
Easy  
• Specs  are  Transpiled  
• Specs  Run  in  the  
Browser
What  About  Ember-­‐CLI?
• InstallaBon  is  Stupid  
Easy  
• Specs  are  Transpiled  
• Specs  Run  in  the  
Browser

More Related Content

What's hot

Server::Starter meets Java
Server::Starter meets JavaServer::Starter meets Java
Server::Starter meets JavaTokuhiro Matsuno
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on WindowsWO Community
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
Christian Johansen
 
Ansible & Vagrant
Ansible & VagrantAnsible & Vagrant
Ansible & Vagrant
Mukul Malhotra
 
3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API
Gavin Pickin
 
Painless JavaScript Testing with Jest
Painless JavaScript Testing with JestPainless JavaScript Testing with Jest
Painless JavaScript Testing with Jest
Michał Pierzchała
 
Is the order code deploy?
Is the order code deploy?Is the order code deploy?
Is the order code deploy?
Yoichi Toyota
 
JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...
JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...
JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...
Andrzej Jóźwiak
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
Christian Johansen
 
CommandBox & ForgeBox Package Management
CommandBox & ForgeBox Package ManagementCommandBox & ForgeBox Package Management
CommandBox & ForgeBox Package Management
Ortus Solutions, Corp
 
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
Ortus Solutions, Corp
 
CI and CD
CI and CDCI and CD
JavaScript Language Update 2016 (LLoT)
JavaScript Language Update 2016 (LLoT)JavaScript Language Update 2016 (LLoT)
JavaScript Language Update 2016 (LLoT)
Teppei Sato
 
Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009Andrea Francia
 
React starter-kitでとっとと始めるisomorphic開発
React starter-kitでとっとと始めるisomorphic開発React starter-kitでとっとと始めるisomorphic開発
React starter-kitでとっとと始めるisomorphic開発
Yoichi Toyota
 
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLEAN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
Gavin Pickin
 
Perl6 web-app
Perl6 web-appPerl6 web-app
Perl6 web-app
Tokuhiro Matsuno
 
Open stack and_vagrant-os-meetup-2015
Open stack and_vagrant-os-meetup-2015Open stack and_vagrant-os-meetup-2015
Open stack and_vagrant-os-meetup-2015
yfauser
 
casperjs presentation
 casperjs presentation casperjs presentation
casperjs presentationAnsviaLab
 
How do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and ClientHow do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and Client
ColdFusionConference
 

What's hot (20)

Server::Starter meets Java
Server::Starter meets JavaServer::Starter meets Java
Server::Starter meets Java
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on Windows
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
 
Ansible & Vagrant
Ansible & VagrantAnsible & Vagrant
Ansible & Vagrant
 
3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API
 
Painless JavaScript Testing with Jest
Painless JavaScript Testing with JestPainless JavaScript Testing with Jest
Painless JavaScript Testing with Jest
 
Is the order code deploy?
Is the order code deploy?Is the order code deploy?
Is the order code deploy?
 
JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...
JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...
JUnit 4 Can it still teach us something? - Andrzej Jóźwiak - Kariera IT Łodź ...
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
 
CommandBox & ForgeBox Package Management
CommandBox & ForgeBox Package ManagementCommandBox & ForgeBox Package Management
CommandBox & ForgeBox Package Management
 
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
North Virginia Coldfusion User Group Meetup - Testbox - July 19th 2017
 
CI and CD
CI and CDCI and CD
CI and CD
 
JavaScript Language Update 2016 (LLoT)
JavaScript Language Update 2016 (LLoT)JavaScript Language Update 2016 (LLoT)
JavaScript Language Update 2016 (LLoT)
 
Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009
 
React starter-kitでとっとと始めるisomorphic開発
React starter-kitでとっとと始めるisomorphic開発React starter-kitでとっとと始めるisomorphic開発
React starter-kitでとっとと始めるisomorphic開発
 
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLEAN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
AN EXERCISE IN CLEANER CODE - FROM LEGACY TO MAINTAINABLE
 
Perl6 web-app
Perl6 web-appPerl6 web-app
Perl6 web-app
 
Open stack and_vagrant-os-meetup-2015
Open stack and_vagrant-os-meetup-2015Open stack and_vagrant-os-meetup-2015
Open stack and_vagrant-os-meetup-2015
 
casperjs presentation
 casperjs presentation casperjs presentation
casperjs presentation
 
How do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and ClientHow do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and Client
 

Viewers also liked

Jam Jadwal Sholat Digital Otomatis Elektronik
Jam Jadwal Sholat Digital Otomatis ElektronikJam Jadwal Sholat Digital Otomatis Elektronik
Jam Jadwal Sholat Digital Otomatis Elektronik
sentra masjid
 
Metformin Underused in Patients With Prediabetes
Metformin Underused in Patients With PrediabetesMetformin Underused in Patients With Prediabetes
Metformin Underused in Patients With Prediabetes
boringevidence640
 
PyLecture2 -NetworkX-
PyLecture2 -NetworkX-PyLecture2 -NetworkX-
PyLecture2 -NetworkX-
Yoshiki Satotani
 
Involvements Overview _ LADevelopers
Involvements Overview _ LADevelopersInvolvements Overview _ LADevelopers
Involvements Overview _ LADevelopersMarius Gabriel Lungu
 
JAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav SrivastavJAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav SrivastavVaibhav Srivastav
 
Sharon Ellsley CV 2015 ss
Sharon Ellsley CV 2015 ssSharon Ellsley CV 2015 ss
Sharon Ellsley CV 2015 ssSharon Ellsley
 
Rohne coal company
Rohne coal companyRohne coal company
Board Engagement Talk for 4 Culture StEPs 9 10 2014
Board Engagement Talk for 4 Culture StEPs 9 10 2014Board Engagement Talk for 4 Culture StEPs 9 10 2014
Board Engagement Talk for 4 Culture StEPs 9 10 2014Erik Pihl
 
Slides giurisprudenza prodotti vita unit index linked
Slides giurisprudenza prodotti vita unit index linkedSlides giurisprudenza prodotti vita unit index linked
Slides giurisprudenza prodotti vita unit index linked
Salvatore Iannitti
 
Top 8 service desk specialist resume samples
Top 8 service desk specialist resume samplesTop 8 service desk specialist resume samples
Top 8 service desk specialist resume samplestonychoper6505
 
Polecane miejsce
Polecane miejscePolecane miejsce
Polecane miejsce
Yuki Sanada
 

Viewers also liked (15)

Jam Jadwal Sholat Digital Otomatis Elektronik
Jam Jadwal Sholat Digital Otomatis ElektronikJam Jadwal Sholat Digital Otomatis Elektronik
Jam Jadwal Sholat Digital Otomatis Elektronik
 
Metformin Underused in Patients With Prediabetes
Metformin Underused in Patients With PrediabetesMetformin Underused in Patients With Prediabetes
Metformin Underused in Patients With Prediabetes
 
PyLecture2 -NetworkX-
PyLecture2 -NetworkX-PyLecture2 -NetworkX-
PyLecture2 -NetworkX-
 
Involvements Overview _ LADevelopers
Involvements Overview _ LADevelopersInvolvements Overview _ LADevelopers
Involvements Overview _ LADevelopers
 
Biz Plan PPT- Ovation
Biz Plan PPT- OvationBiz Plan PPT- Ovation
Biz Plan PPT- Ovation
 
JAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav SrivastavJAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav Srivastav
 
Blog
BlogBlog
Blog
 
Sharon Ellsley CV 2015 ss
Sharon Ellsley CV 2015 ssSharon Ellsley CV 2015 ss
Sharon Ellsley CV 2015 ss
 
EFFI 7
EFFI 7EFFI 7
EFFI 7
 
Rohne coal company
Rohne coal companyRohne coal company
Rohne coal company
 
Board Engagement Talk for 4 Culture StEPs 9 10 2014
Board Engagement Talk for 4 Culture StEPs 9 10 2014Board Engagement Talk for 4 Culture StEPs 9 10 2014
Board Engagement Talk for 4 Culture StEPs 9 10 2014
 
Slides giurisprudenza prodotti vita unit index linked
Slides giurisprudenza prodotti vita unit index linkedSlides giurisprudenza prodotti vita unit index linked
Slides giurisprudenza prodotti vita unit index linked
 
Top 8 service desk specialist resume samples
Top 8 service desk specialist resume samplesTop 8 service desk specialist resume samples
Top 8 service desk specialist resume samples
 
Polecane miejsce
Polecane miejscePolecane miejsce
Polecane miejsce
 
WP Final Presentation
WP Final PresentationWP Final Presentation
WP Final Presentation
 

Similar to Mocha, chai and sinon

Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
Ryan Cuprak
 
WebAssemlby vs JavaScript
WebAssemlby vs JavaScriptWebAssemlby vs JavaScript
WebAssemlby vs JavaScript
Alexandr Skachkov
 
Devoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesDevoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesEric Bottard
 
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptxSH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptxMongoDB
 
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDBPowering Microservices with Docker, Kubernetes, Kafka, and MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDB
MongoDB
 
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,..."Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
Yandex
 
Jest: Frontend Testing richtig gemacht @WebworkerNRW
Jest: Frontend Testing richtig gemacht @WebworkerNRWJest: Frontend Testing richtig gemacht @WebworkerNRW
Jest: Frontend Testing richtig gemacht @WebworkerNRW
Holger Grosse-Plankermann
 
create auto scale jboss cluster with openshift
create auto scale jboss cluster with openshiftcreate auto scale jboss cluster with openshift
create auto scale jboss cluster with openshift
Yusuf Hadiwinata Sutandar
 
Node.js in a heterogeneous system
Node.js in a heterogeneous systemNode.js in a heterogeneous system
Node.js in a heterogeneous systemGeeksLab Odessa
 
Deno Crate Organization
Deno Crate OrganizationDeno Crate Organization
Deno Crate Organization
Anthony Campolo
 
MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...
MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...
MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...
MongoDB
 
GPSTEC304_Shipping With PorpoiseA K8s Story
GPSTEC304_Shipping With PorpoiseA K8s StoryGPSTEC304_Shipping With PorpoiseA K8s Story
GPSTEC304_Shipping With PorpoiseA K8s Story
Amazon Web Services
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Amazon Web Services
 
Test like a_boss
Test like a_bossTest like a_boss
Test like a_boss
Giuseppe Maxia
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...
Evans Ye
 
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDBPowering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
MongoDB
 
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDBPowering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
MongoDB
 
Node.js in a heterogeneous system
Node.js in a heterogeneous systemNode.js in a heterogeneous system
Node.js in a heterogeneous system
Alexey (Mr_Mig) Migutsky
 
Bootstrapping Quality
Bootstrapping QualityBootstrapping Quality
Bootstrapping Quality
Michael Roufa
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best PracticesEric Bottard
 

Similar to Mocha, chai and sinon (20)

Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
 
WebAssemlby vs JavaScript
WebAssemlby vs JavaScriptWebAssemlby vs JavaScript
WebAssemlby vs JavaScript
 
Devoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesDevoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best Practices
 
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptxSH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
 
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDBPowering Microservices with Docker, Kubernetes, Kafka, and MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDB
 
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,..."Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
 
Jest: Frontend Testing richtig gemacht @WebworkerNRW
Jest: Frontend Testing richtig gemacht @WebworkerNRWJest: Frontend Testing richtig gemacht @WebworkerNRW
Jest: Frontend Testing richtig gemacht @WebworkerNRW
 
create auto scale jboss cluster with openshift
create auto scale jboss cluster with openshiftcreate auto scale jboss cluster with openshift
create auto scale jboss cluster with openshift
 
Node.js in a heterogeneous system
Node.js in a heterogeneous systemNode.js in a heterogeneous system
Node.js in a heterogeneous system
 
Deno Crate Organization
Deno Crate OrganizationDeno Crate Organization
Deno Crate Organization
 
MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...
MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...
MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...
 
GPSTEC304_Shipping With PorpoiseA K8s Story
GPSTEC304_Shipping With PorpoiseA K8s StoryGPSTEC304_Shipping With PorpoiseA K8s Story
GPSTEC304_Shipping With PorpoiseA K8s Story
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 
Test like a_boss
Test like a_bossTest like a_boss
Test like a_boss
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...
 
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDBPowering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
 
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDBPowering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
 
Node.js in a heterogeneous system
Node.js in a heterogeneous systemNode.js in a heterogeneous system
Node.js in a heterogeneous system
 
Bootstrapping Quality
Bootstrapping QualityBootstrapping Quality
Bootstrapping Quality
 
Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best Practices
 

Recently uploaded

digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
ssuser36d3051
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Self-Control of Emotions by Slidesgo.pptx
Self-Control of Emotions by Slidesgo.pptxSelf-Control of Emotions by Slidesgo.pptx
Self-Control of Emotions by Slidesgo.pptx
iemerc2024
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
obonagu
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
bhadouriyakaku
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 

Recently uploaded (20)

digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Self-Control of Emotions by Slidesgo.pptx
Self-Control of Emotions by Slidesgo.pptxSelf-Control of Emotions by Slidesgo.pptx
Self-Control of Emotions by Slidesgo.pptx
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 

Mocha, chai and sinon

  • 1. Mocha,  Chai  and  Sinon                  @adstage                @adstage Andrew  Dixon   andrew@adstage.io
  • 2.                @adstage Senior  So(ware  Engineer  at  AdStage   Has  been  launching  companies  since  the  last   millennium.  Worked  on  everything  from  the   Linux  Kernel  to  AmbiBous  SPAs  with  Ember. Andrew Dixon RAISED AdStage  All-­‐In-­‐One  Ad  PlaHorm   Build,  deploy  &  manage  ad  campaigns   across  Google,  Bing,  Facebook,  TwiOer  &   LinkedIn.                  @adstage
  • 3. “The only thing we know about the future is that it will be different.” -­‐  Peter  Drucker                @adstage
  • 5. Pros   *  Stable  -­‐  first  release  in  2008   *  Large  Community   *  IntegraBons   Cons    *  Syntax        *  ConfiguraBon          (e.g.  asserBon  libraries)    *  Asynchronous  TesBng      *  Headless  Run  Support  
  • 6. Pros   *  NodeJS  NaBve        (i.e.  headless  out  of  the  box)   *  ExcepBon  on  Failure        (only  req.  for  asserBon  lib)   *  Asynchronous  TesBng Cons   *  Support        (i.e.  no  Ember  happy  path)   *  IntegraBons  
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Sandbox   *  Great  for  OrganizaBon   *  Call  `restore()`  Once
  • 12. Spies   *  Records  arguments,        return  values  and        excepBons   *  Wrap  ExisBng        or  Anonymous   *  Maintains  Behavior
  • 13. Stubs   *  Spies  with  Defined        Behavior   *  Does  Not  Call        ExisBng  FuncBon   *  Useful  for  Forcing        Errors
  • 14. Mocks   *  Stubs  with  Defined        ExpectaBons   *  Use  Only  for  Method        Under  Test
  • 15. How  is  AdStage  Tes6ng? • Makefile  to  run   specs  with  NodeJS   • HBS  Compiled  to  JS   • jsDOM   • RequireJS  to  load   only  the  components   being  tested
  • 16. How  is  AdStage  Tes6ng? • Makefile  to  run   specs  with  NodeJS   • HBS  Compiled  to  JS   • jsDOM   • RequireJS  to  load   only  the  components   being  tested
  • 17. What  About  Ember-­‐CLI? • InstallaBon  is  Stupid   Easy   • Specs  are  Transpiled   • Specs  Run  in  the   Browser
  • 18. What  About  Ember-­‐CLI? • InstallaBon  is  Stupid   Easy   • Specs  are  Transpiled   • Specs  Run  in  the   Browser