File tree Expand file tree Collapse file tree 15 files changed +12797
-8619
lines changed Expand file tree Collapse file tree 15 files changed +12797
-8619
lines changed Original file line number Diff line number Diff line change
1
+ < nav id ="api " class ="sidebar sticky ">
2
+ < a href ="{{ site.github.url }}/api/ " class ="item{% if page.url == '/api/index.html' %} active{% endif %} ">
3
+ Introduction
4
+ </ a >
5
+ < a href ="{{ site.github.url }}/api/bdd/ " class ="item{% if page.url == '/api/bdd/' %} active{% endif %} ">
6
+ Expect / Should
7
+ </ a >
8
+ < a href ="{{ site.github.url }}/api/assert/ " class ="item{% if page.url == '/api/assert/' %} active{% endif %} ">
9
+ Assert
10
+ </ a >
11
+ < a href ="{{ site.github.url }}/api/plugins/ " class ="item{% if page.url == '/api/plugins/' %} active{% endif %} ">
12
+ Plugin Utilities
13
+ </ a >
14
+ < a href ="{{ site.github.url }}/api/test/ " class ="item{% if page.url == '/api/test/' %} active{% endif %} ">
15
+ Online Test Suite
16
+ </ a >
17
+ {% if page.api_namespace %}
18
+ < div class ="list box-wrap antiscroll-wrap " style ="height: 338px; ">
19
+ < div class ="box ">
20
+ < div class ="antiscroll-inner " style ="height: 338px; width: 225px; ">
21
+ < div class ="box-inner ">
22
+ {% for method in site.data.chai %}
23
+ {% assign render = false %}
24
+ {% assign name = false %}
25
+ {% for tag in method.tags %}
26
+ {% if tag.type == "namespace" and tag.string == page.api_namespace %}
27
+ {% assign render = true %}
28
+ {% endif %}
29
+ {% if tag.type == "name" %}
30
+ {% capture name %}{{ tag.string }}{% endcapture %}
31
+ {% endif %}
32
+ {% endfor %}
33
+ {% if render %}
34
+ < a href ="#method_{{ name | slugify }} " class ="scroll item "> {{ name }}</ a >
35
+ {% endif %}
36
+ {% endfor %}
37
+ </ div >
38
+ </ div >
39
+ </ div >
40
+ </ div >
41
+ {% endif %}
42
+ </ nav >
Original file line number Diff line number Diff line change @@ -34,5 +34,4 @@ <h3 class="fancy">
34
34
</ ul >
35
35
</ div >
36
36
</ section >
37
- < script src ="/chai.js " type ="text/javascript "> </ script >
38
37
</ footer >
Original file line number Diff line number Diff line change 14
14
< script src ="{{site.github.url}}/js/jquery-mousewheel.js "> </ script >
15
15
< script src ="{{site.github.url}}/js/antiscroll.js "> </ script >
16
16
< script src ="{{site.github.url}}/js/main.js "> </ script >
17
+ < script src ="https://cdn.rawgit.com/chaijs/chai/{{ site.data.releases[0].tag_name }}/chai.js "> </ script >
17
18
18
19
< link rel ='stylesheet ', href ="{{site.github.url}}/css/antiscroll.css " type ="text/css " media ="all ">
19
20
< link rel ='stylesheet ', href ="{{site.github.url}}/css/main.css " type ="text/css " media ="all ">
Original file line number Diff line number Diff line change 2
2
layout: default
3
3
bodyClass: api
4
4
---
5
- < nav id ="api " class ="sidebar sticky ">
6
- < a href ="{{ site.github.url }}/api/ " class ="item{% if page.url == '/api/index.html' %} active{% endif %} ">
7
- Introduction
8
- </ a >
9
- < a href ="{{ site.github.url }}/api/bdd/ " class ="item{% if page.url == '/api/bdd/' %} active{% endif %} ">
10
- Expect / Should
11
- </ a >
12
- < a href ="{{ site.github.url }}/api/assert/ " class ="item{% if page.url == '/api/assert/' %} active{% endif %} ">
13
- Assert
14
- </ a >
15
- < a href ="{{ site.github.url }}/api/plugins/ " class ="item{% if page.url == '/api/plugins/' %} active{% endif %} ">
16
- Plugin Utilities
17
- </ a >
18
- < a href ="{{ site.github.url }}/api/test/ " class ="item{% if page.url == '/api/test/' %} active{% endif %} ">
19
- Online Test Suite
20
- </ a >
21
- {% if page.api_namespace %}
22
- < div class ="list box-wrap antiscroll-wrap " style ="height: 338px; ">
23
- < div class ="box ">
24
- < div class ="antiscroll-inner " style ="height: 338px; width: 225px; ">
25
- < div class ="box-inner ">
26
- {% for method in site.data.chai %}
27
- {% assign render = false %}
28
- {% assign name = false %}
29
- {% for tag in method.tags %}
30
- {% if tag.type == "namespace" and tag.string == page.api_namespace %}
31
- {% assign render = true %}
32
- {% endif %}
33
- {% if tag.type == "name" %}
34
- {% capture name %}{{ tag.string }}{% endcapture %}
35
- {% endif %}
36
- {% endfor %}
37
- {% if render %}
38
- < a href ="#method_{{ name | slugify }} " class ="scroll item "> {{ name }}</ a >
39
- {% endif %}
40
- {% endfor %}
41
- </ div >
42
- </ div >
43
- </ div >
44
- </ div >
45
- {% endif %}
46
- </ nav >
5
+ {% include apiSidebar.html %}
47
6
< div class ="documentation ">
48
7
< div class ="wrap ">
49
8
< div class ="rendered ">
Original file line number Diff line number Diff line change
1
+ ---
2
+ layout: default
3
+ bodyClass: tests
4
+ ---
5
+ {% include apiSidebar.html %}
6
+ < div class ="documentation ">
7
+ < div class ="wrap ">
8
+ < div class ="rendered ">
9
+ < article >
10
+ {{ content }}
11
+ </ article >
12
+ </ div >
13
+ < div id ="mocha "> </ div >
14
+ </ div >
15
+ </ div >
16
+ < script src ="{{ site.github.url }}/js/mocha.js "> </ script >
17
+ < script >
18
+ mocha . setup ( 'bdd' ) ;
19
+
20
+ err = function ( fn , msg ) {
21
+ try {
22
+ fn ( ) ;
23
+ throw new chai . AssertionError ( { message : 'Expected an error' } ) ;
24
+ } catch ( err ) {
25
+ if ( 'string' === typeof msg ) {
26
+ chai . expect ( err . message ) . to . equal ( msg ) ;
27
+ } else {
28
+ chai . expect ( err . message ) . to . match ( msg ) ;
29
+ }
30
+ }
31
+ } ;
32
+ </ script >
33
+ < script src ="https://cdn.rawgit.com/chaijs/chai/{{ site.data.releases[0].tag_name }}/test/assert.js "> </ script >
34
+ < script src ="https://cdn.rawgit.com/chaijs/chai/{{ site.data.releases[0].tag_name }}/test/configuration.js "> </ script >
35
+ < script src ="https://cdn.rawgit.com/chaijs/chai/{{ site.data.releases[0].tag_name }}/test/expect.js "> </ script >
36
+ < script src ="https://cdn.rawgit.com/chaijs/chai/{{ site.data.releases[0].tag_name }}/test/globalShould.js "> </ script >
37
+ < script src ="https://cdn.rawgit.com/chaijs/chai/{{ site.data.releases[0].tag_name }}/test/plugins.js "> </ script >
38
+ < script src ="https://cdn.rawgit.com/chaijs/chai/{{ site.data.releases[0].tag_name }}/test/should.js "> </ script >
39
+ < script src ="https://cdn.rawgit.com/chaijs/chai/{{ site.data.releases[0].tag_name }}/test/utilities.js "> </ script >
40
+ < script >
41
+ mocha . run ( ) ;
42
+ </ script >
Original file line number Diff line number Diff line change 1
1
---
2
2
title : Online Test Suite
3
- template : tests
3
+ layout : test
4
4
weight : 35
5
5
permalink : /api/test/
6
6
---
@@ -11,5 +11,3 @@ This is the test suite that we use to test Chai during development. Use it to co
11
11
that Chai will function correctly in your browser environment (` should ` does
12
12
not work in IE9). These tests are powered by the awesome [ Mocha] ( http://visionmedia.github.com/mocha/ )
13
13
test framework.
14
-
15
- *** The test suite is currently missing, as discussed [ on this issue] ( https://github.com/chaijs/chai-docs/issues/122 ) . We welcome any help in bringing it back!***
You can’t perform that action at this time.
0 commit comments