Book Image

Mastering ArcGIS Server Development with JavaScript

By : Raymond Kenneth Doman
Book Image

Mastering ArcGIS Server Development with JavaScript

By: Raymond Kenneth Doman

Overview of this book

Table of Contents (18 chapters)
Mastering ArcGIS Server Development with JavaScript
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Our application


For our application, we're going to set up unit testing for our Y2K map app using Intern. Unlike our other applications, which only required a browser, we're going to use Node.js for this setup. If we were following real TDD/BDD practices, we would have written these tests while we were developing the application. However, this will give you practice writing tests for any legacy applications you've previously written.

For this sample, we'll follow the example provided by David Spriggs and Tom Wayson through GitHub (https://github.com/DavidSpriggs/intern-tutorial-esri-jsapi). We'll make some modifications to work with more recent updates in both the ArcGIS JavaScript API and in the modules associated with the tests.

Adding testing files

In our Y2K application, we're going to add several files to work with the required Node.js modules. We'll add a package.json file, which tells the Node Package Manager (NPM) what modules we need and what version numbers we require. Next, we'll...