How do I Write Testable Javascript so I can Test my CF API on Server and Client?

"Most projects in CF now involve creating some type of consumable CFC Endpoint or API Service... do you Unit test your API, do you use Integration Tests on your API?

Everyone who wasn't writing JavaScript, probably is now. Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript. That's great, but how do we test it. In ColdFusion we have CFCs, most languages have classes... but JavaScript doesn't have classes (yet). So how do I write unit tests, what units are there, and how do I make my code look like that.

We build our CFCs and CF API to be consumed with AJAX, and like Server Side, we need to be able to test our CFC endpoints, and the Javascript that uses them. Testing serverside with Testbox and Clientside with Jasmine. With Testbox and Jasmine both using BDD, your test code can almost be isomorphic.

Take your JavaScript spaghetti and make it unit testable. Test your API on Server and Client.

Attendees will learn: • How to use Testbox to test CFCs and CF Apis on the Server • Different types and ways to test JavaScript • Structuring your JavaScript to be unit testable • Overview of client side testing tools • Overview of server side testing tools • Building testing into your workflow • You are one of many that are not testing your JavaScript

Attendees should have some exposure to Unit Testing Ideas, CFCs as endpoints or CF API creation, and consuming with JavaScript, but this is for the Professional Newbie... who always needs to learn and adapt."

November 10, 2015

11:00 am - 12:00 pm
1 hour
Bristlecone 5
Software Consultant & ContentBox Evangelist
Ortus Solutions, Corp