File tree Expand file tree Collapse file tree 2 files changed +37
-18
lines changed Expand file tree Collapse file tree 2 files changed +37
-18
lines changed Original file line number Diff line number Diff line change
1
+ # Contributing
2
+
3
+ For running the tests, you will need:
4
+
5
+ * Ruby 1.9.3+ with Bundler
6
+ * PhantomJS (for headless testing)
7
+
8
+ First run bootstrap to ensure necessary dependencies:
9
+
10
+ ```
11
+ $ script/bootstrap
12
+ ```
13
+
14
+ Then run headless tests in the console:
15
+
16
+ ```
17
+ $ script/test [<test-file>]
18
+ ```
19
+
20
+ To run tests in other browsers, start a server:
21
+
22
+ ```
23
+ $ script/server
24
+ # now open http://localhost:4567/
25
+ ```
26
+
27
+ ## Test structure
28
+
29
+ There are 3 main test modules:
30
+
31
+ * ` test/unit/fn_pjax.js ` - Primarily tests the ` $.fn.pjax ` method and its options
32
+ * ` test/unit/pjax.js ` - Main comprehensive pjax functionality tests
33
+ * ` test/unit/pjax_fallback.js ` - Tests that verify same result after navigation
34
+ even if pjax is disabled (like for browsers that don't support pushState).
35
+
36
+ Each test drives a hidden test page in an ` <iframe> ` . See other tests to see how
37
+ they trigger pjax by using the ` frame ` reference and remember to do so as well.
Original file line number Diff line number Diff line change 386
386
387
387
Deploying a deploy, bumping the version constant to force clients to do a full reload the next request getting the new layout and assets.
388
388
389
- ## Contributing
390
-
391
- ```
392
- $ git clone https://github.com/defunkt/jquery-pjax.git
393
- $ cd jquery-pjax/
394
- ```
395
-
396
- To run the test suite locally, start up the Sinatra test application.
397
-
398
- ```
399
- $ bundle install
400
- $ bundle exec ruby test/app.rb
401
- == Sinatra/1.4.5 has taken the stage on 4567 for development with backup from WEBrick
402
-
403
- # in another tab:
404
- $ open http://localhost:4567/
405
- ```
406
-
407
389
[ compat ] : http://caniuse.com/#search=pushstate
408
390
[ $.fn.on ] : http://api.jquery.com/on/
409
391
[ $.ajax ] : http://api.jquery.com/jQuery.ajax/
You can’t perform that action at this time.
0 commit comments