Skip to content

Instantly share code, notes, and snippets.

@zachleat
Created May 23, 2018 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zachleat/27e61d1a7dc25e6cab40241e05e0239c to your computer and use it in GitHub Desktop.
Save zachleat/27e61d1a7dc25e6cab40241e05e0239c to your computer and use it in GitHub Desktop.
Testing lettering sample code
;(function ($) {
function Lettering() {}
Lettering.prototype.splitText = function() {};
Lettering.prototype.injector = function() {};
window.LetteringJS = Lettering;
})(jQuery);
@zachleat
Copy link
Author

zachleat commented May 23, 2018

Then you can test with

var letter = new Lettering();
// where test is your testing tool
test.is(letter.splitText("My test string"), ["M", "y", " "…]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment