@@ -4,24 +4,24 @@ const assert = require('assert');
4
4
const sinon = require ( 'sinon' ) ;
5
5
const app = require ( '../sources/app' ) ;
6
6
7
- describe ( "createQueryString()" , function ( ) {
8
- describe ( "given no params" , function ( ) {
9
- it ( "should return empty string" , function ( ) {
7
+ describe ( "createQueryString()" , ( ) => {
8
+ describe ( "given no params" , ( ) => {
9
+ it ( "should return empty string" , ( ) => {
10
10
assert . equal ( app . createQueryString ( ) , "" ) ;
11
11
} ) ;
12
12
} ) ;
13
- describe ( "given empty params" , function ( ) {
14
- it ( "should return empty string" , function ( ) {
13
+ describe ( "given empty params" , ( ) => {
14
+ it ( "should return empty string" , ( ) => {
15
15
assert . equal ( app . createQueryString ( [ ] ) , "" ) ;
16
16
} ) ;
17
17
} ) ;
18
- describe ( "given a single parameter name and value" , function ( ) {
19
- it ( "should return question mark followed by name, equals-sign and value" , function ( ) {
18
+ describe ( "given a single parameter name and value" , ( ) => {
19
+ it ( "should return question mark followed by name, equals-sign and value" , ( ) => {
20
20
assert . equal ( app . createQueryString ( [ { name : "name" , value : "value" } ] ) , "?name=value" ) ;
21
21
} ) ;
22
22
} ) ;
23
- describe ( "given several parameters" , function ( ) {
24
- it ( "should return name-value pairs separated by ampersands" , function ( ) {
23
+ describe ( "given several parameters" , ( ) => {
24
+ it ( "should return name-value pairs separated by ampersands" , ( ) => {
25
25
assert . equal (
26
26
app . createQueryString ( [ { name : "name" , value : "value" } , { name : "otherName" , value : "otherValue" } ] ) ,
27
27
"?name=value&otherName=otherValue"
@@ -30,16 +30,24 @@ describe("createQueryString()", function () {
30
30
} ) ;
31
31
} ) ;
32
32
33
- describe ( "makeGetRequest()" , function ( ) {
33
+ describe ( "makeGetRequest()" , ( ) => {
34
34
var xhr , requests ;
35
35
36
- before ( function ( ) {
36
+ before ( ( ) => {
37
37
xhr = sinon . useFakeXMLHttpRequest ( ) ;
38
38
requests = [ ] ;
39
39
xhr . onCreate = function ( req ) { requests . push ( req ) ; } ;
40
40
} ) ;
41
- after ( function ( ) {
41
+ after ( ( ) => {
42
42
xhr . restore ( ) ;
43
43
} ) ;
44
44
45
+ describe ( "returning OK status" , ( ) => {
46
+
47
+ } ) ;
48
+
49
+ describe ( "returning non-OK status" , ( ) => {
50
+
51
+ } ) ;
52
+
45
53
} ) ;
0 commit comments