3
3
var expect = require ( 'chai' ) . expect ;
4
4
var FastBootHeaders = require ( './../src/fastboot-headers.js' ) ;
5
5
6
- describe ( 'FastBootHeaders' , function ( ) {
7
- it ( 'lower normalizes the headers to lowercase' , function ( ) {
6
+ describe ( 'FastBootHeaders' , function ( ) {
7
+ it ( 'lower normalizes the headers to lowercase' , function ( ) {
8
8
var headers = {
9
9
'X-Test-Header' : 'value1, value2' ,
10
10
} ;
@@ -13,7 +13,7 @@ describe('FastBootHeaders', function () {
13
13
expect ( headers . getAll ( 'x-test-header' ) ) . to . deep . equal ( [ 'value1, value2' ] ) ;
14
14
} ) ;
15
15
16
- it ( 'returns an array from getAll when header value is string' , function ( ) {
16
+ it ( 'returns an array from getAll when header value is string' , function ( ) {
17
17
var headers = {
18
18
'x-test-header' : 'value1, value2' ,
19
19
} ;
@@ -22,7 +22,7 @@ describe('FastBootHeaders', function () {
22
22
expect ( headers . getAll ( 'x-test-header' ) ) . to . deep . equal ( [ 'value1, value2' ] ) ;
23
23
} ) ;
24
24
25
- it ( 'returns an array of header values from getAll, regardless of header name casing' , function ( ) {
25
+ it ( 'returns an array of header values from getAll, regardless of header name casing' , function ( ) {
26
26
var headers = {
27
27
'x-test-header' : [ 'value1' , 'value2' ] ,
28
28
} ;
@@ -32,7 +32,7 @@ describe('FastBootHeaders', function () {
32
32
expect ( headers . getAll ( 'x-test-header' ) ) . to . deep . equal ( [ 'value1' , 'value2' ] ) ;
33
33
} ) ;
34
34
35
- it ( 'returns an emtpy array when a header is not present' , function ( ) {
35
+ it ( 'returns an emtpy array when a header is not present' , function ( ) {
36
36
var headers = {
37
37
'x-test-header' : [ 'value1' , 'value2' ] ,
38
38
} ;
@@ -42,7 +42,7 @@ describe('FastBootHeaders', function () {
42
42
expect ( headers . getAll ( 'host' ) ) . to . deep . equal ( [ ] ) ;
43
43
} ) ;
44
44
45
- it ( 'returns the first value when using get, regardless of case' , function ( ) {
45
+ it ( 'returns the first value when using get, regardless of case' , function ( ) {
46
46
var headers = {
47
47
'x-test-header' : [ 'value1' , 'value2' ] ,
48
48
} ;
@@ -52,7 +52,7 @@ describe('FastBootHeaders', function () {
52
52
expect ( headers . get ( 'x-test-header' ) ) . to . equal ( 'value1' ) ;
53
53
} ) ;
54
54
55
- it ( 'returns null when using get when a header is not present' , function ( ) {
55
+ it ( 'returns null when using get when a header is not present' , function ( ) {
56
56
var headers = {
57
57
'x-test-header' : [ 'value1' , 'value2' ] ,
58
58
} ;
@@ -62,7 +62,7 @@ describe('FastBootHeaders', function () {
62
62
expect ( headers . get ( 'host' ) ) . to . be . null ;
63
63
} ) ;
64
64
65
- it ( 'returns whether or not a header is present via has, regardless of casing' , function ( ) {
65
+ it ( 'returns whether or not a header is present via has, regardless of casing' , function ( ) {
66
66
var headers = {
67
67
'x-test-header' : [ 'value1' , 'value2' ] ,
68
68
} ;
@@ -74,7 +74,7 @@ describe('FastBootHeaders', function () {
74
74
expect ( headers . has ( 'host' ) ) . to . be . false ;
75
75
} ) ;
76
76
77
- it ( 'appends entries onto a header, regardless of casing' , function ( ) {
77
+ it ( 'appends entries onto a header, regardless of casing' , function ( ) {
78
78
var headers = new FastBootHeaders ( ) ;
79
79
80
80
expect ( headers . has ( 'x-foo' ) ) . to . be . false ;
@@ -87,7 +87,7 @@ describe('FastBootHeaders', function () {
87
87
expect ( headers . getAll ( 'x-foo' ) ) . to . deep . equal ( [ 'bar' , 'baz' ] ) ;
88
88
} ) ;
89
89
90
- it ( 'deletes entries onto a header, regardless of casing' , function ( ) {
90
+ it ( 'deletes entries onto a header, regardless of casing' , function ( ) {
91
91
var headers = new FastBootHeaders ( ) ;
92
92
93
93
headers . append ( 'X-Foo' , 'bar' ) ;
@@ -97,7 +97,7 @@ describe('FastBootHeaders', function () {
97
97
expect ( headers . has ( 'x-foo' ) ) . to . be . false ;
98
98
} ) ;
99
99
100
- it ( 'returns an iterator for the header/value pairs when calling entries' , function ( ) {
100
+ it ( 'returns an iterator for the header/value pairs when calling entries' , function ( ) {
101
101
var headers = new FastBootHeaders ( ) ;
102
102
103
103
headers . append ( 'X-Foo' , 'foo' ) ;
@@ -111,7 +111,7 @@ describe('FastBootHeaders', function () {
111
111
expect ( entriesIterator . next ( ) ) . to . deep . equal ( { value : undefined , done : true } ) ;
112
112
} ) ;
113
113
114
- it ( 'returns an iterator for keys containing all the keys' , function ( ) {
114
+ it ( 'returns an iterator for keys containing all the keys' , function ( ) {
115
115
var headers = new FastBootHeaders ( ) ;
116
116
117
117
headers . append ( 'X-Foo' , 'foo' ) ;
@@ -125,7 +125,7 @@ describe('FastBootHeaders', function () {
125
125
expect ( entriesIterator . next ( ) ) . to . deep . equal ( { value : undefined , done : true } ) ;
126
126
} ) ;
127
127
128
- it ( 'sets a header, overwriting existing values, regardless of casing' , function ( ) {
128
+ it ( 'sets a header, overwriting existing values, regardless of casing' , function ( ) {
129
129
var headers = new FastBootHeaders ( ) ;
130
130
131
131
expect ( headers . getAll ( 'x-foo' ) ) . to . deep . equal ( [ ] ) ;
@@ -141,7 +141,7 @@ describe('FastBootHeaders', function () {
141
141
expect ( headers . getAll ( 'x-bar' ) ) . to . deep . equal ( [ 'baz' ] ) ;
142
142
} ) ;
143
143
144
- it ( 'returns an iterator for values containing all the values' , function ( ) {
144
+ it ( 'returns an iterator for values containing all the values' , function ( ) {
145
145
var headers = new FastBootHeaders ( ) ;
146
146
147
147
headers . append ( 'X-Foo' , 'foo' ) ;
@@ -155,7 +155,7 @@ describe('FastBootHeaders', function () {
155
155
expect ( entriesIterator . next ( ) ) . to . deep . equal ( { value : undefined , done : true } ) ;
156
156
} ) ;
157
157
158
- it ( 'when mistakenly used `Ember.get` with an unknown property, it attempts to get the header with that name and warns the user to use `headers.get` instead' , function ( ) {
158
+ it ( 'when mistakenly used `Ember.get` with an unknown property, it attempts to get the header with that name and warns the user to use `headers.get` instead' , function ( ) {
159
159
var headers = {
160
160
'x-test-header' : [ 'value1' , 'value2' ] ,
161
161
} ;
0 commit comments