Skip to content

Instantly share code, notes, and snippets.

@fabien-d
Created July 10, 2014 18:37
Show Gist options
  • Save fabien-d/2f9a5ddd514e8da33223 to your computer and use it in GitHub Desktop.
Save fabien-d/2f9a5ddd514e8da33223 to your computer and use it in GitHub Desktop.
Unit tests - Conditional
// self invoking function will run on page load
// looking for a way to rerun (reload) the script before each test
( function myFunction () {
'use strict';
if ( condition ) {
// something
} else {
// something else
}
} () );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment