SlideShare a Scribd company logo
@wswebcreation
NODE.JS AND TESTING



Knowing the 

dependency of your
dependencies
@wswebcreation
@wswebcreation
You’re like
...
@wswebcreation
@wswebcreation
Agenda
•Node.JS
•History
•How does it work?
•Installing
•NPM
•Node.JS & Testing
•Q&A
@wswebcreation
@wswebcreation
Node.JS

It’s rising
• 1995 by Brendan Eich
@wswebcreation
@wswebcreation
Node.JS

It’s rising
• 1995 by Brendan Eich
• Created in 10 days
@wswebcreation
@wswebcreation
Node.JS

It’s rising
• 1995 by Brendan Eich
• Created in 10 days
• Started as LiveScript
@wswebcreation
@wswebcreation
Node.JS

It’s rising
• 1995 by Brendan Eich
• Created in 10 days
• Started as LiveScript
• 1996 ECMA standard
@wswebcreation
@wswebcreation
Node.JS

It’s rising
• 1995 by Brendan Eich
• Created in 10 days
• Started as LiveScript
• 1996 ECMA standard
• 2005 Ajax was created
@wswebcreation
@wswebcreation
Node.JS

It’s rising
• 1995 by Brendan Eich
• Created in 10 days
• Started as LiveScript
• 1996 ECMA standard
• 2005 Ajax was created
@wswebcreation
@wswebcreation
Node.JS

It’s rising
• 1995 by Brendan Eich
• Created in 10 days
• Started as LiveScript
• 1996 ECMA standard
• 2005 Ajax was created
• 2006 jQuery
@wswebcreation
@wswebcreation
Node.JS - What it’s NOT?
!!PROGRAMMING LANGUAGE!!
@wswebcreation
Node.JS - What is it?
Node is an open source cross
platform runtime environment for
JavaScript outside of a browser,
based on Chromes V8 engine.
@wswebcreation
Node.JS
•Founded in 2009
@wswebcreation
@wswebcreation
Node.JS
•Founded in 2009
•Chromes V8 engine
@wswebcreation
@wswebcreation
Node.JS
•Founded in 2009
•Chromes V8 engine
•NodeJS evolved rapidly
@wswebcreation
• 2010: Express
• 2011:
• npm 1.0 released
• LinkedIn, Uber,.. adopt NodeJS
• 2012-2014: lots of improvements
• 2015:
• Node.JS Foundation is born
• ES6 support
• Private modules
• Yarn is born
• 2016-now: 📈
@wswebcreation
Node.JS
•Founded in 2009
•Chromes V8 engine
•NodeJS evolved rapidly
•Build whatever you want
•Complex Websites
@wswebcreation
@wswebcreation
Node.JS
•Founded in 2009
•Chromes V8 engine
•NodeJS evolved rapidly
•Build whatever you want
•Complex Websites
•Build Mobile Apps
@wswebcreation
@wswebcreation
Node.JS
•Founded in 2009
•Chromes V8 engine
•NodeJS evolved rapidly
•Build whatever you want
•Complex Websites
•Build Mobile Apps
•Build desktop apps
@wswebcreation
@wswebcreation
Node.JS vs Java
•Do NOT use Node for CPU-intensive tasks
•Meant for data intensive and real time applications
•Asynchronous vs synchronous
@wswebcreation
How does it work?
@wswebcreation
Asynchronous
Handle multiple 

non-blocking requests 

on a single thread.
@wswebcreation
Kitchen
Table 1 Table2
Asynchronous
Handle multiple 

non-blocking requests 

on a single thread.
@wswebcreation
Kitchen
Table 1 Table2
Request
1
Request
2
Single
thread
Asynchronous
Handle multiple 

non-blocking requests 

on a single thread.
@wswebcreation
Kitchen
Table 1 Table2
Synchronous
Handle one 

blocking request

on a single thread.
@wswebcreation
Promises
A promise is an object which
can be returned synchronously
from an asynchronous
function. It will be in one
of 3 possible states:
•Pending
•Fulfilled
•Rejected
@wswebcreation
@wswebcreation
(A)synchronous
•Synchronous (Java) code
@wswebcreation
(A)synchronous
•Synchronous (Java) code
•Native promises
@wswebcreation
(A)synchronous
•Synchronous (Java) code
•Native promises
•Multiple promises
@wswebcreation
(A)synchronous
•Synchronous (Java) code
•Native promises
•Multiple promises
•Async await
@wswebcreation
Releases
•Odd released in October
• Short lived
• Not production ready
Source: https://developer.okta.com/blog/2019/12/04/whats-new-nodejs-2020
@wswebcreation
Releases
•Odd released in October
• Short lived
• Not production ready
•Even released in April
• Odd stop receiving updates
• Developed for 6 months (RC)
Source: https://developer.okta.com/blog/2019/12/04/whats-new-nodejs-2020
@wswebcreation
Releases
•Odd released in October
• Short lived
• Not production ready
•Even released in April
• Odd stop receiving updates
• Developed for 6 months (RC)
•LTS
• Production ready
• bug/security fixes
Source: https://developer.okta.com/blog/2019/12/04/whats-new-nodejs-2020
@wswebcreation
Releases
•Odd released in October
• Short lived
• Not production ready
•Even released in April
• Odd stop receiving updates
• Developed for 6 months (RC)
•LTS
• Production ready
• bug/security fixes
Source: https://developer.okta.com/blog/2019/12/04/whats-new-nodejs-2020
@wswebcreation
2020
Source: https://developer.okta.com/blog/2019/12/04/whats-new-nodejs-2020
@wswebcreation
Features
Bugfixes
Security Updates!
What’s in a release
@wswebcreation
Features
Bugfixes
Security Updates!
What’s in a release
@wswebcreation
Features
Bugfixes
Security Updates!
What’s in a release
@wswebcreation
Features
Bugfixes
Security Updates!
What’s in a release
@wswebcreation
Features
Bugfixes
Security Updates!
What’s in a release
@wswebcreation
ECMA20##/
ES#(###)
•ECMAScript is the standard
•ES is short for ECMAScript
•As of 2015 ES{year} is used
@wswebcreation
@wswebcreation
Babel is a JavaScript compiler.
Use next generation JavaScript, today.
@wswebcreation
Installing
•Download it though https://nodejs.org
•Through the command line:
•For Mac use Homebrew
•For Ubuntu use apt-get
@wswebcreation
Up/Downgrading
•Download it though https://nodejs.org
•Through the command line:
•With an NPM package called {n}
•For Mac use Homebrew
•For Ubuntu use apt-get
@wswebcreation
Node Version
Manager
Command line tool to
•Download
•Upgrade
•Downgrade
With a single command
@wswebcreation
@wswebcreation
NPM
Node Package Manager:
•The website
@wswebcreation
@wswebcreation
NPM
Node Package Manager:
•The website
•A Command Line Interface
@wswebcreation
@wswebcreation
NPM
Node Package Manager:
•The website
•A Command Line Interface
•A registry where all
package are stored
@wswebcreation
@wswebcreation
Package
A package is a project/
collection of 1 or multiple
{node_modules} which have a
specific task as described in
the {package.json}-file.
@wswebcreation
(Dis)Advantages
Advantages
•Share versioned code
with the OS-community
•Use locally and
globally
•Easy to download
standalone tools
Disadvantages
•There are already
1.000.000+ packages
•Projects can blow up in
local space size
•Versioning is not
properly used by every
maintainer
@wswebcreation
There’s a
package for that
{is-odd}
@wswebcreation
@wswebcreation
There’s a
package for that
{is-odd}
@wswebcreation
@wswebcreation
Project size
Starting an 

Angular

project


500+MB

¯_(ツ)_/¯
@wswebcreation
@wswebcreation
npx
A npm package runner

to run a package 

without installing
@wswebcreation
SemVer
Semantic Versioning (X.Y.Z)
• MAJOR(X): incompatible API changes
• MINOR(Y): add functionality in a
backwards compatible manner (^)
• PATCH(Z): backwards compatible bug
fixes (~)
@wswebcreation
SemVer
Semantic Versioning (X.Y.Z)
• MAJOR(X): incompatible API changes
• MINOR(Y): add functionality in a
backwards compatible manner (^)
• PATCH(Z): backwards compatible bug
fixes (~)
@wswebcreationSource: http://www.wswebcreation.nl/share-your-it-mnemonic/
@wswebcreation
package-lock.json
•Automatically generated
when npm modifies the
{node_modules} tree, or
{package.json}
•Describes the exact tree,
including versions of the
latest working installation
•Optimizes the installation
process of the packages for
a new project
@wswebcreation
@wswebcreation
Yarn
Yarn build by Facebook in
2015 to address:
• Consistency
• Security
• Speed
@wswebcreation
@wswebcreation
Node.JS & Testing
•Node.JS based UI-automation
frameworks
@wswebcreation
Node.JS & Testing
•Node.JS based UI-automation
frameworks
•Node.JS uses Chromes V8
@wswebcreation
Node.JS & Testing
•Node.JS based UI-automation
frameworks
•Node.JS uses Chromes V8
@wswebcreation
Node.JS & Testing
•Node.JS based UI-automation
frameworks
•Node.JS uses Chromes V8
•API-testing with SuperTest
@wswebcreation@wswebcreation
Q&A
@wswebcreation
Thank you
•@wswebcreation
•https://github.com/
wswebcreation
•wim.selles@saucelabs.com

More Related Content

What's hot

AtlasCamp 2013: Bring your own Stack
AtlasCamp 2013: Bring your own Stack AtlasCamp 2013: Bring your own Stack
AtlasCamp 2013: Bring your own Stack
colleenfry
 

What's hot (20)

Capybara testing
Capybara testingCapybara testing
Capybara testing
 
WordPress Development with VVV, VV, and Vagrant
WordPress Development with VVV, VV, and VagrantWordPress Development with VVV, VV, and Vagrant
WordPress Development with VVV, VV, and Vagrant
 
Manage your environment with DSC
Manage your environment with DSCManage your environment with DSC
Manage your environment with DSC
 
WordCamp IL 2016 - WordPress Scale on AWS
WordCamp IL 2016 - WordPress Scale on AWSWordCamp IL 2016 - WordPress Scale on AWS
WordCamp IL 2016 - WordPress Scale on AWS
 
ColdFusion builder plugins
ColdFusion builder pluginsColdFusion builder plugins
ColdFusion builder plugins
 
AtlasCamp 2013: Bring your own Stack
AtlasCamp 2013: Bring your own Stack AtlasCamp 2013: Bring your own Stack
AtlasCamp 2013: Bring your own Stack
 
engage 2016 - Get ready for moving from Java 6 to Java 8 - Now!
engage 2016 - Get ready for moving from Java 6 to Java 8 - Now!engage 2016 - Get ready for moving from Java 6 to Java 8 - Now!
engage 2016 - Get ready for moving from Java 6 to Java 8 - Now!
 
Flexible UI Components for a Multi-Framework World
Flexible UI Components for a Multi-Framework WorldFlexible UI Components for a Multi-Framework World
Flexible UI Components for a Multi-Framework World
 
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapakBrief Intro to Phoenix - Elixir Meetup at BukaLapak
Brief Intro to Phoenix - Elixir Meetup at BukaLapak
 
ICONUK 2015 - Gradle Up!
ICONUK 2015 - Gradle Up!ICONUK 2015 - Gradle Up!
ICONUK 2015 - Gradle Up!
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With Jest
 
Server side rendering review
Server side rendering reviewServer side rendering review
Server side rendering review
 
Isomorphic web application
Isomorphic web applicationIsomorphic web application
Isomorphic web application
 
NCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streamsNCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streams
 
IBM and Node.js - Old Doge, New Tricks
IBM and Node.js - Old Doge, New TricksIBM and Node.js - Old Doge, New Tricks
IBM and Node.js - Old Doge, New Tricks
 
Developing, building, testing and deploying react native apps
Developing, building, testing and deploying react native appsDeveloping, building, testing and deploying react native apps
Developing, building, testing and deploying react native apps
 
The Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsThe Dark Side of Single Page Applications
The Dark Side of Single Page Applications
 
Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16
 
Iam New And Noteworthy
Iam New And NoteworthyIam New And Noteworthy
Iam New And Noteworthy
 
Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...
 

Similar to Node.JS: Do you know the dependency of your dependencies dependency

Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
OdessaJS Conf
 
End to End Testing with nightwatchjs
End to End  Testing with nightwatchjsEnd to End  Testing with nightwatchjs
End to End Testing with nightwatchjs
Srikanth Madduri
 

Similar to Node.JS: Do you know the dependency of your dependencies dependency (20)

Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
 
WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?
 
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
 
The MEAN Stack
The MEAN StackThe MEAN Stack
The MEAN Stack
 
WebAssembly Overview
WebAssembly OverviewWebAssembly Overview
WebAssembly Overview
 
Dcjq node.js presentation
Dcjq node.js presentationDcjq node.js presentation
Dcjq node.js presentation
 
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
MidwestJS 2014 Reconciling ReactJS as a View Layer ReplacementMidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
 
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
 
Nightwatch JS for End to End Tests
Nightwatch JS for End to End TestsNightwatch JS for End to End Tests
Nightwatch JS for End to End Tests
 
Improving WordPress Development and Deployments with Docker
Improving WordPress Development and Deployments with DockerImproving WordPress Development and Deployments with Docker
Improving WordPress Development and Deployments with Docker
 
End to End Testing with nightwatchjs
End to End  Testing with nightwatchjsEnd to End  Testing with nightwatchjs
End to End Testing with nightwatchjs
 
Advanced Web Technology.pptx
Advanced Web Technology.pptxAdvanced Web Technology.pptx
Advanced Web Technology.pptx
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
LASUG Online: Introduction to Docker and Docker Tools
LASUG Online: Introduction to Docker and Docker ToolsLASUG Online: Introduction to Docker and Docker Tools
LASUG Online: Introduction to Docker and Docker Tools
 
Introduction to scaling your WordPress site past a single node using AWS
Introduction to scaling your WordPress site past a single node using AWSIntroduction to scaling your WordPress site past a single node using AWS
Introduction to scaling your WordPress site past a single node using AWS
 
WebAssemlby vs JavaScript
WebAssemlby vs JavaScriptWebAssemlby vs JavaScript
WebAssemlby vs JavaScript
 
React Tech Salon
React Tech SalonReact Tech Salon
React Tech Salon
 
Bootstrapping angular js with bower grunt yeoman
Bootstrapping angular js with bower grunt yeomanBootstrapping angular js with bower grunt yeoman
Bootstrapping angular js with bower grunt yeoman
 
My Little Webap - DevOpsSec is Magic
My Little Webap - DevOpsSec is MagicMy Little Webap - DevOpsSec is Magic
My Little Webap - DevOpsSec is Magic
 
Mvvm knockout vs angular
Mvvm knockout vs angularMvvm knockout vs angular
Mvvm knockout vs angular
 

More from Wim Selles

More from Wim Selles (8)

Builda responsivetypescriptwebdriverio framework
Builda responsivetypescriptwebdriverio frameworkBuilda responsivetypescriptwebdriverio framework
Builda responsivetypescriptwebdriverio framework
 
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
 
Building Your Own Native App Visual Testing Module with Appium
Building Your Own Native App Visual Testing Module with AppiumBuilding Your Own Native App Visual Testing Module with Appium
Building Your Own Native App Visual Testing Module with Appium
 
Building Your Own Native App Visual Testing Module with Appium
Building Your Own Native App  Visual Testing Module with AppiumBuilding Your Own Native App  Visual Testing Module with Appium
Building Your Own Native App Visual Testing Module with Appium
 
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
How React Native, Appium and me made each other shine @Frontmania 16-11-2018How React Native, Appium and me made each other shine @Frontmania 16-11-2018
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
 
How React Native Appium and me made each other shine
How React Native Appium and me made each other shineHow React Native Appium and me made each other shine
How React Native Appium and me made each other shine
 
Testing beyond the default click-paths
Testing beyond  the default click-pathsTesting beyond  the default click-paths
Testing beyond the default click-paths
 
Why the h# should I use Appium with React Native
Why the h# should I use Appium with React NativeWhy the h# should I use Appium with React Native
Why the h# should I use Appium with React Native
 

Recently uploaded

Recently uploaded (20)

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 

Node.JS: Do you know the dependency of your dependencies dependency