jQuery plugin & testing with Jasmine
Upcoming SlideShare
Loading in...5
×
 

jQuery plugin & testing with Jasmine

on

  • 1,837 views

 

Statistics

Views

Total Views
1,837
Views on SlideShare
1,837
Embed Views
0

Actions

Likes
1
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    jQuery plugin & testing with Jasmine jQuery plugin & testing with Jasmine Presentation Transcript

    • jQuery Plugins & Jasmine A lightning quick example @mparramon
    • What? With · some useful js code Create · a full-fledged jQuery plugin · with unit testing
    • File inputs in some browsers: The problem
    • let's fix it! · add styling · custom button · initial value Based on quirksmode.org/dom/inputfile.html
    • jQuery plugin http://docs.jquery.com/Plugins/Authoring
    • Basic Framework
    • Defaults and options
    • Mantaining chainability
    • Unit testing with Jasmine http://pivotal.github.com/jasmine/
    • Initial setup Modify SpecRunner.html:
    • DSL
    • jasmine-jquery 2 extensions for Jasmine: · an HTML fixtures API · a set of jQuery custom matchers https://github.com/velesin/jasmine-jquery
    • Fixtures
    • Expectations
    • Our final code jquery-enhancedfileinput ↳ lib ↳ jasmine-1.3.0 spec ↳ jquery-enhancedfileinput_spec.js ↳ jasmine-jquery-1.3.1.js src ↳ jquery-enhancedfileinput.js ↳ demo.html ↳ README.md ↳ SpecRunner.html
    • No time! @mparramon github.com/mparramont Questions?