SlideShare a Scribd company logo
LIKE A GENIE FROM THE LAMP
    Headless JavaScript Testing with Jasmine and PhantomJS




Rob Friesel                                     @founddrama
WHO IS THIS GUY?

• Sr. User
         Interface Developer
 at Dealer.com Websystems

• out   there on the web:

  • @founddrama

  • blog.founddrama.net

  • github.com/founddrama
WHAT ARE WE TALKING
  ABOUT TODAY?
IN THE BEGINNING...
But then we discover...

UNIT TESTING
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and PhantomJS
BENEFITS OF UNIT TESTING
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and PhantomJS
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and PhantomJS
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and PhantomJS
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and PhantomJS
DEMO
SO WHAT'S THE PROBLEM?
AUTOMATION
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and PhantomJS
var page = new WebPage();
  page.onConsoleMessage = function(msg) {
    console.log(msg);
  };

  console.log('[phantomjs] Loading page...');

  page.open(encodeURI('http://blog.founddrama.net/'), function(status){
   if (status !== 'success') {
     console.log('could not retrieve!');
    } else {
      page.evaluate(function(){
       console.log('[phantomjs] Querying for post titles...');
       var list = Array.prototype.slice.call(
                           document.querySelectorAll('h2 > a[rel="bookmark"]'), 0);
       console.log('[phantomjs] ' + list.length + ' post titles:');
        list.forEach(function(el){
         console.log(' ' + el.innerHTML.replace(/<.*?>/g, ''));
       });
      });
    }
   phantom.exit();
  });
ARE YOU THINKING
WHAT I'M THINKING?
LET'S DO SOMETHING
      AWESOME!
QUESTIONS?
THANKS!
RESOURCES

• Jasmine    : http://pivotal.github.com/jasmine/

• PhantomJS     : http://phantomjs.org/

• Larry   Myers' jasmine-reporters :

 https://github.com/larrymyers/jasmine-reporters

• this   talk's sample code :

 https://github.com/founddrama/vt-code-camp-2012

More Related Content

What's hot (20)

PDF
Javascript Test Automation Workshop (21.08.2014)
Deutsche Post
 
PDF
Роман Лютиков "Web Apps Performance & JavaScript Compilers"
Fwdays
 
PPTX
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
Scrum Breakfast Vietnam
 
PPTX
Testing frontends with nightwatch & saucelabs
Tudor Barbu
 
PPTX
CasperJS
LearningTech
 
PPT
Fav
helloppt
 
PPTX
Jasmine with JS-Test-Driver
Devesh Chanchlani
 
DOC
Selenium Automation Using Ruby
Kumari Warsha Goel
 
PDF
Philip Shurpik "Architecting React Native app"
Fwdays
 
PDF
The Road to Native Web Components
Mike North
 
ZIP
Mojolicious
Marcus Ramberg
 
PPTX
Игорь Фесенко "Web Apps Performance & JavaScript Compilers"
Fwdays
 
PDF
Django rest framework tips and tricks
xordoquy
 
ODP
Unit Testing With Javascript
thedumbterminal
 
KEY
Rails Presentation (Anton Dmitriyev)
True-Vision
 
PPTX
Test-Driven JavaScript Development (JavaZone 2010)
Christian Johansen
 
PDF
Puppeteer - Headless Chrome Node API
Wilson Su
 
PPT
AppengineJS
Panagiotis Astithas
 
PDF
"Augmented reality in your browser", Alina Karpelceva
Fwdays
 
PPTX
Puppeteer
Adrian Caetano
 
Javascript Test Automation Workshop (21.08.2014)
Deutsche Post
 
Роман Лютиков "Web Apps Performance & JavaScript Compilers"
Fwdays
 
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
Scrum Breakfast Vietnam
 
Testing frontends with nightwatch & saucelabs
Tudor Barbu
 
CasperJS
LearningTech
 
Jasmine with JS-Test-Driver
Devesh Chanchlani
 
Selenium Automation Using Ruby
Kumari Warsha Goel
 
Philip Shurpik "Architecting React Native app"
Fwdays
 
The Road to Native Web Components
Mike North
 
Mojolicious
Marcus Ramberg
 
Игорь Фесенко "Web Apps Performance & JavaScript Compilers"
Fwdays
 
Django rest framework tips and tricks
xordoquy
 
Unit Testing With Javascript
thedumbterminal
 
Rails Presentation (Anton Dmitriyev)
True-Vision
 
Test-Driven JavaScript Development (JavaZone 2010)
Christian Johansen
 
Puppeteer - Headless Chrome Node API
Wilson Su
 
AppengineJS
Panagiotis Astithas
 
"Augmented reality in your browser", Alina Karpelceva
Fwdays
 
Puppeteer
Adrian Caetano
 

Recently uploaded (20)

PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Ad

Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and PhantomJS

  • 1. LIKE A GENIE FROM THE LAMP Headless JavaScript Testing with Jasmine and PhantomJS Rob Friesel @founddrama
  • 2. WHO IS THIS GUY? • Sr. User Interface Developer at Dealer.com Websystems • out there on the web: • @founddrama • blog.founddrama.net • github.com/founddrama
  • 3. WHAT ARE WE TALKING ABOUT TODAY?
  • 5. But then we discover... UNIT TESTING
  • 12. DEMO
  • 13. SO WHAT'S THE PROBLEM?
  • 16. var page = new WebPage(); page.onConsoleMessage = function(msg) {   console.log(msg); }; console.log('[phantomjs] Loading page...'); page.open(encodeURI('http://blog.founddrama.net/'), function(status){    if (status !== 'success') {      console.log('could not retrieve!');   } else {     page.evaluate(function(){        console.log('[phantomjs] Querying for post titles...');        var list = Array.prototype.slice.call( document.querySelectorAll('h2 > a[rel="bookmark"]'), 0);        console.log('[phantomjs] ' + list.length + ' post titles:');       list.forEach(function(el){          console.log(' ' + el.innerHTML.replace(/<.*?>/g, ''));        });     });   }    phantom.exit(); });
  • 17. ARE YOU THINKING WHAT I'M THINKING?
  • 18. LET'S DO SOMETHING AWESOME!
  • 21. RESOURCES • Jasmine : http://pivotal.github.com/jasmine/ • PhantomJS : http://phantomjs.org/ • Larry Myers' jasmine-reporters : https://github.com/larrymyers/jasmine-reporters • this talk's sample code : https://github.com/founddrama/vt-code-camp-2012

Editor's Notes

  • #2: - first off: thanks\n- second: sorry about the cheesy title\n-- (trying to be clever, just sounds lame)\n
  • #3: - other claims to fame:\n-- jshint contributor (flyweight category)\n-- helped to do some of the editing for Nicholas Zakas&apos; Pro JS for WebDev (3rd Ed.)\n
  • #4: - per title: &quot;headless JavaScript unit testing&quot;\n- and our toolkit? *Jasmine* and *PhantomJS*\n- (reliable) testing for your front-end code\n
  • #5: - You&apos;re just clicking around, right?\n- crude methods\n
  • #6: - &quot;Anyone *not* know what unit testing is?&quot;\n-- (brief explanation) or: &quot;I&apos;ll skip the primer on unit testing...&quot;\n
  • #7: - &quot;And of course we can even go all the way to TDD...&quot;\n-- &quot;but let&apos;s stay out of that discussion today...&quot;\n\n
  • #8: - (self-explanatory?)\n- more confident about the changes you make\n- more confident in the changes *others* make\n- builds business value b/c you can &quot;prove&quot; stability\n- [ASK] What else?\n
  • #9: &quot;And now for a brief overview of the JS unit testing landscape!&quot;\n\n- &quot;If you&apos;ve unit tested in other languages before...&quot; (usually a clear winner)\n-- results of my *totally unscientific survey*:\n--- Java: JUnit\n--- Groovy: Spock\n--- Ruby: RSpec\n--- .NET: NUnit\n--- Scala: specs\n\n&quot;...the JavaScript unit testing landscape is... less clear...&quot;\n
  • #10: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #11: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #12: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #13: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #14: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #15: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #16: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #17: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #18: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #19: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #20: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #21: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #22: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #23: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #24: - Wikipedia article: &apos;Unit testing frameworks&apos;: table features **35** diff. unit testing fwks for JS. (not even an exhaustive list)\n-- here&apos;s just a few...\n- &quot;The community doesn&apos;t really rally around any one solution...&quot;\n-- &quot;depends on what you&apos;re doing&quot; (browser? node? some specific library?)\n-- most claim fwk/lib agnostic (&quot;but find me someone using DOH on non-Dojo)\n-- sidebar re: Ben Cherry&apos;s &quot;Writing Testable JavaScript&quot;?\n-- and/but: at some point you just need to pick one...\n
  • #25: - Q. &quot;Why Jasmine?&quot;\n-- (funny) A. &quot;Well, you gotta pick something...&quot;\n-- (real) A. &quot;BDD&quot;\n- Q. &quot;What is BDD?&quot; A. &quot;Behavior Driven Development&quot;\n-- testing/dev methodology based loosely on TDD\n-- main difference? (as I understand it) &quot;natural language&quot; approach\n--- tests are written as &quot;behaviors&quot; - can (should!) be written by the BA\n--- ...and easily converted into tests (write your tests with your BAs)\n
  • #26: DEMO : alt-tab\n- explain our utility lib + math lib\n- explain our specs/tests\n- &quot;just scratching the surface of Jasmine here&quot;\n- DON&apos;T FORGET: passing tests aren&apos;t interesting\n-- make a few fail (have some failing to start with)\n- discussion? other ones we can write?\n-- max() test w/ negative numbers\n-- max w/ `0e0` formatted numbers\n-- max test w/ `Infinity`\n\n
  • #27: &quot;So now we have some unit tests -- and that&apos;s a big improvement.&quot;\n\n** BUT: **\n- this approach is not w/o its problems\n-- [ASK] chief among them? (what do you think?)\n-- you&apos;re doing it in the browser (so *that&apos;s* slow...)\n- and even if you could tolerate that... (reloading the page over and over...)\n-- ( to say nothing of dealing with multiple browsers )\n- ...what about automation? ...what about continuous integration?\n\n
  • #28: AUTOMATION + CI\n\n&quot;A little bit of a sidebar...&quot; (but not much)\n\n- mention: Selenium, WebDriver, Geb\n- mention: BusterJS\n- mention notion of &quot;browser lab&quot;\n- *but* - &quot;These are cumbersome, slow, expensive...&quot;\n-- and most of the time it&apos;s overkill\n--- esp. for quick tests on your dev box\n
  • #29: &quot;PhantomJS!&quot;\n- Q. &quot;What is PhantomJS?&quot; A. &quot;headless WebKit&quot; (plus explanation)\n-- *aside:* you can use it for just about anything...\n- Q. &quot;How does this help us?&quot;\n-- 1. A. &quot;Gets you out of the browser refresh game.&quot;\n-- 2. A. &quot;Sets you up for a CI strategy.&quot;\n\n- **sidebar:** won&apos;t solve all your problems; running tests in PhantomJS is like running then &quot;just in Chrome&quot; -- and it has everything that a browser has *except* an actual &quot;physical&quot; viewport (use in conjunction w/ JSHint and your regular QA)\n-- (not pictured) : imagine : add Grunt? add a watch script? connect to something like Growl?\n\n- Q. &quot;How do you interact with PhantomJS?&quot;\n-- A. (show a &quot;hello world&quot; type example and introduce the API)\n\n
  • #30: - walkthrough\n-- WebPage\n-- explain what this does (which isn&apos;t much)\n-- but enough to introduce the API\n
  • #31: - &quot;Are you thinking what I&apos;m thinking?&quot;\n-- we have some interesting tools here\n-- we could really cobble something together...\n-- ...to solve that CI problem\n- &quot;...fortunately...&quot;\n-- Larry Myers has done most of the heavy-lifting for us already\n- so we have:\n-- Jasmine (test framework)\n-- PhantomJS (test environment)\n-- Larry Myers&apos; jasmine-reporters (adapter + test runner)\n
  • #32: - demo!\n- cheat sheet:\n-- $ phantomjs lib/jasmine-reporters/test/phantomjs-testrunner.js $(pwd)/test/all-tests-spec.htm\n-- remember: make sure that you fail some tests too\n-- remember: use `echo $?` to show the exit codes...\n- &quot;Writing scripts around this can be trivial...&quot;\n-- see also: it&apos;s also possible to wrap the tests with test runners (e.g., to run the tests as part of your regular CI tests...)\n- NOT going to actually stand up Jenkins or anything like that...\n-- &quot;But you get the idea...&quot;\n
  • #33: \n
  • #34: \n
  • #35: \n