m0603va 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Laba6/file1.js +23 -0
- package/Laba6/file2.js +23 -0
- package/Laba6/index.html +63 -0
- package/Laba6/m0603.js +29 -0
- package/Laba6/node_modules/.package-lock.json +83 -0
- package/Laba6/node_modules/httpntlm/.jshintrc +4 -0
- package/Laba6/node_modules/httpntlm/LICENSE +20 -0
- package/Laba6/node_modules/httpntlm/README.md +148 -0
- package/Laba6/node_modules/httpntlm/httpntlm.js +104 -0
- package/Laba6/node_modules/httpntlm/ntlm.js +390 -0
- package/Laba6/node_modules/httpntlm/package.json +33 -0
- package/Laba6/node_modules/httpreq/LICENSE +19 -0
- package/Laba6/node_modules/httpreq/README.md +383 -0
- package/Laba6/node_modules/httpreq/contributors.md +26 -0
- package/Laba6/node_modules/httpreq/lib/httpreq.js +681 -0
- package/Laba6/node_modules/httpreq/package.json +102 -0
- package/Laba6/node_modules/m0603sol/m0603.js +29 -0
- package/Laba6/node_modules/m0603sol/package.json +12 -0
- package/Laba6/node_modules/nodemailer/.gitattributes +6 -0
- package/Laba6/node_modules/nodemailer/.prettierrc.js +8 -0
- package/Laba6/node_modules/nodemailer/CHANGELOG.md +725 -0
- package/Laba6/node_modules/nodemailer/CODE_OF_CONDUCT.md +76 -0
- package/Laba6/node_modules/nodemailer/CONTRIBUTING.md +67 -0
- package/Laba6/node_modules/nodemailer/LICENSE +16 -0
- package/Laba6/node_modules/nodemailer/README.md +97 -0
- package/Laba6/node_modules/nodemailer/SECURITY.txt +22 -0
- package/Laba6/node_modules/nodemailer/lib/addressparser/index.js +313 -0
- package/Laba6/node_modules/nodemailer/lib/base64/index.js +142 -0
- package/Laba6/node_modules/nodemailer/lib/dkim/index.js +251 -0
- package/Laba6/node_modules/nodemailer/lib/dkim/message-parser.js +155 -0
- package/Laba6/node_modules/nodemailer/lib/dkim/relaxed-body.js +154 -0
- package/Laba6/node_modules/nodemailer/lib/dkim/sign.js +117 -0
- package/Laba6/node_modules/nodemailer/lib/fetch/cookies.js +281 -0
- package/Laba6/node_modules/nodemailer/lib/fetch/index.js +274 -0
- package/Laba6/node_modules/nodemailer/lib/json-transport/index.js +82 -0
- package/Laba6/node_modules/nodemailer/lib/mail-composer/index.js +558 -0
- package/Laba6/node_modules/nodemailer/lib/mailer/index.js +427 -0
- package/Laba6/node_modules/nodemailer/lib/mailer/mail-message.js +315 -0
- package/Laba6/node_modules/nodemailer/lib/mime-funcs/index.js +625 -0
- package/Laba6/node_modules/nodemailer/lib/mime-funcs/mime-types.js +2102 -0
- package/Laba6/node_modules/nodemailer/lib/mime-node/index.js +1290 -0
- package/Laba6/node_modules/nodemailer/lib/mime-node/last-newline.js +33 -0
- package/Laba6/node_modules/nodemailer/lib/mime-node/le-unix.js +43 -0
- package/Laba6/node_modules/nodemailer/lib/mime-node/le-windows.js +52 -0
- package/Laba6/node_modules/nodemailer/lib/nodemailer.js +143 -0
- package/Laba6/node_modules/nodemailer/lib/qp/index.js +219 -0
- package/Laba6/node_modules/nodemailer/lib/sendmail-transport/index.js +210 -0
- package/Laba6/node_modules/nodemailer/lib/ses-transport/index.js +349 -0
- package/Laba6/node_modules/nodemailer/lib/shared/index.js +638 -0
- package/Laba6/node_modules/nodemailer/lib/smtp-connection/data-stream.js +108 -0
- package/Laba6/node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js +143 -0
- package/Laba6/node_modules/nodemailer/lib/smtp-connection/index.js +1796 -0
- package/Laba6/node_modules/nodemailer/lib/smtp-pool/index.js +648 -0
- package/Laba6/node_modules/nodemailer/lib/smtp-pool/pool-resource.js +253 -0
- package/Laba6/node_modules/nodemailer/lib/smtp-transport/index.js +416 -0
- package/Laba6/node_modules/nodemailer/lib/stream-transport/index.js +135 -0
- package/Laba6/node_modules/nodemailer/lib/well-known/index.js +47 -0
- package/Laba6/node_modules/nodemailer/lib/well-known/services.json +286 -0
- package/Laba6/node_modules/nodemailer/lib/xoauth2/index.js +376 -0
- package/Laba6/node_modules/nodemailer/package.json +46 -0
- package/Laba6/node_modules/nodemailer/postinstall.js +101 -0
- package/Laba6/node_modules/nodemailer-fetch/.eslintrc.js +56 -0
- package/Laba6/node_modules/nodemailer-fetch/.travis.yml +19 -0
- package/Laba6/node_modules/nodemailer-fetch/CHANGELOG.md +30 -0
- package/Laba6/node_modules/nodemailer-fetch/Gruntfile.js +27 -0
- package/Laba6/node_modules/nodemailer-fetch/LICENSE +16 -0
- package/Laba6/node_modules/nodemailer-fetch/README.md +55 -0
- package/Laba6/node_modules/nodemailer-fetch/lib/cookies.js +275 -0
- package/Laba6/node_modules/nodemailer-fetch/lib/fetch.js +224 -0
- package/Laba6/node_modules/nodemailer-fetch/package.json +30 -0
- package/Laba6/node_modules/nodemailer-fetch/test/cookies-test.js +391 -0
- package/Laba6/node_modules/nodemailer-fetch/test/fetch-test.js +486 -0
- package/Laba6/node_modules/nodemailer-shared/.eslintrc.js +59 -0
- package/Laba6/node_modules/nodemailer-shared/.travis.yml +18 -0
- package/Laba6/node_modules/nodemailer-shared/Gruntfile.js +27 -0
- package/Laba6/node_modules/nodemailer-shared/LICENSE +16 -0
- package/Laba6/node_modules/nodemailer-shared/README.md +14 -0
- package/Laba6/node_modules/nodemailer-shared/lib/shared.js +282 -0
- package/Laba6/node_modules/nodemailer-shared/package.json +36 -0
- package/Laba6/node_modules/nodemailer-shared/test/fixtures/message.html +1 -0
- package/Laba6/node_modules/nodemailer-shared/test/shared-test.js +291 -0
- package/Laba6/node_modules/nodemailer-smtp-transport/.eslintrc.js +59 -0
- package/Laba6/node_modules/nodemailer-smtp-transport/Gruntfile.js +27 -0
- package/Laba6/node_modules/nodemailer-smtp-transport/LICENSE +19 -0
- package/Laba6/node_modules/nodemailer-smtp-transport/README.md +7 -0
- package/Laba6/node_modules/nodemailer-smtp-transport/lib/smtp-transport.js +281 -0
- package/Laba6/node_modules/nodemailer-smtp-transport/package.json +37 -0
- package/Laba6/node_modules/nodemailer-wellknown/.travis.yml +17 -0
- package/Laba6/node_modules/nodemailer-wellknown/LICENSE +19 -0
- package/Laba6/node_modules/nodemailer-wellknown/README.md +80 -0
- package/Laba6/node_modules/nodemailer-wellknown/index.js +47 -0
- package/Laba6/node_modules/nodemailer-wellknown/package.json +26 -0
- package/Laba6/node_modules/nodemailer-wellknown/services.json +255 -0
- package/Laba6/node_modules/nodemailer-wellknown/test.js +23 -0
- package/Laba6/node_modules/smtp-connection/.eslintrc.js +56 -0
- package/Laba6/node_modules/smtp-connection/CHANGELOG.md +164 -0
- package/Laba6/node_modules/smtp-connection/Gruntfile.js +27 -0
- package/Laba6/node_modules/smtp-connection/LICENSE +19 -0
- package/Laba6/node_modules/smtp-connection/README.md +200 -0
- package/Laba6/node_modules/smtp-connection/lib/data-stream.js +111 -0
- package/Laba6/node_modules/smtp-connection/lib/smtp-connection.js +1443 -0
- package/Laba6/node_modules/smtp-connection/package.json +41 -0
- package/Laba6/node_modules/underscore/LICENSE +23 -0
- package/Laba6/node_modules/underscore/README.md +22 -0
- package/Laba6/node_modules/underscore/package.json +41 -0
- package/Laba6/node_modules/underscore/underscore-min.js +6 -0
- package/Laba6/node_modules/underscore/underscore.js +1415 -0
- package/Laba6/package-lock.json +94 -0
- package/Laba6/package.json +17 -0
- package/Laba6.txt +31 -0
- package/file1.js +23 -0
- package/file2.js +23 -0
- package/index.html +63 -0
- package/m0603.js +29 -0
- package/m0603Sol/m0603.js +29 -0
- package/m0603Sol/package.json +12 -0
- package/package.json +17 -0
@@ -0,0 +1,391 @@
|
|
1
|
+
/* eslint no-unused-expressions:0 */
|
2
|
+
/* globals beforeEach, describe, it */
|
3
|
+
|
4
|
+
'use strict';
|
5
|
+
|
6
|
+
var chai = require('chai');
|
7
|
+
var expect = chai.expect;
|
8
|
+
|
9
|
+
//var http = require('http');
|
10
|
+
var Cookies = require('../lib/cookies');
|
11
|
+
|
12
|
+
chai.config.includeStack = true;
|
13
|
+
|
14
|
+
describe('Cookies Unit Tests', function () {
|
15
|
+
var biskviit;
|
16
|
+
|
17
|
+
beforeEach(function () {
|
18
|
+
biskviit = new Cookies();
|
19
|
+
});
|
20
|
+
|
21
|
+
describe('#getPath', function () {
|
22
|
+
|
23
|
+
it('should return root path', function () {
|
24
|
+
expect(biskviit.getPath('/')).to.equal('/');
|
25
|
+
expect(biskviit.getPath('')).to.equal('/');
|
26
|
+
expect(biskviit.getPath('/index.php')).to.equal('/');
|
27
|
+
});
|
28
|
+
|
29
|
+
it('should return without file', function () {
|
30
|
+
expect(biskviit.getPath('/path/to/file')).to.equal('/path/to/');
|
31
|
+
});
|
32
|
+
|
33
|
+
});
|
34
|
+
|
35
|
+
describe('#isExpired', function () {
|
36
|
+
it('should match expired cookie', function () {
|
37
|
+
expect(biskviit.isExpired({
|
38
|
+
name: 'a',
|
39
|
+
value: 'b',
|
40
|
+
expires: new Date(Date.now() + 10000)
|
41
|
+
})).to.be.false;
|
42
|
+
|
43
|
+
expect(biskviit.isExpired({
|
44
|
+
name: 'a',
|
45
|
+
value: '',
|
46
|
+
expires: new Date(Date.now() + 10000)
|
47
|
+
})).to.be.true;
|
48
|
+
|
49
|
+
expect(biskviit.isExpired({
|
50
|
+
name: 'a',
|
51
|
+
value: 'b',
|
52
|
+
expires: new Date(Date.now() - 10000)
|
53
|
+
})).to.be.true;
|
54
|
+
});
|
55
|
+
});
|
56
|
+
|
57
|
+
describe('#compare', function () {
|
58
|
+
it('should match similar cookies', function () {
|
59
|
+
expect(biskviit.compare({
|
60
|
+
name: 'zzz',
|
61
|
+
path: '/',
|
62
|
+
domain: 'example.com',
|
63
|
+
secure: false,
|
64
|
+
httponly: false
|
65
|
+
}, {
|
66
|
+
name: 'zzz',
|
67
|
+
path: '/',
|
68
|
+
domain: 'example.com',
|
69
|
+
secure: false,
|
70
|
+
httponly: false
|
71
|
+
})).to.be.true;
|
72
|
+
|
73
|
+
expect(biskviit.compare({
|
74
|
+
name: 'zzz',
|
75
|
+
path: '/',
|
76
|
+
domain: 'example.com',
|
77
|
+
secure: false,
|
78
|
+
httponly: false
|
79
|
+
}, {
|
80
|
+
name: 'yyy',
|
81
|
+
path: '/',
|
82
|
+
domain: 'example.com',
|
83
|
+
secure: false,
|
84
|
+
httponly: false
|
85
|
+
})).to.be.false;
|
86
|
+
|
87
|
+
expect(biskviit.compare({
|
88
|
+
name: 'zzz',
|
89
|
+
path: '/',
|
90
|
+
domain: 'example.com',
|
91
|
+
secure: false,
|
92
|
+
httponly: false
|
93
|
+
}, {
|
94
|
+
name: 'zzz',
|
95
|
+
path: '/amp',
|
96
|
+
domain: 'example.com',
|
97
|
+
secure: false,
|
98
|
+
httponly: false
|
99
|
+
})).to.be.false;
|
100
|
+
|
101
|
+
expect(biskviit.compare({
|
102
|
+
name: 'zzz',
|
103
|
+
path: '/',
|
104
|
+
domain: 'example.com',
|
105
|
+
secure: false,
|
106
|
+
httponly: false
|
107
|
+
}, {
|
108
|
+
name: 'zzz',
|
109
|
+
path: '/',
|
110
|
+
domain: 'examples.com',
|
111
|
+
secure: false,
|
112
|
+
httponly: false
|
113
|
+
})).to.be.false;
|
114
|
+
|
115
|
+
expect(biskviit.compare({
|
116
|
+
name: 'zzz',
|
117
|
+
path: '/',
|
118
|
+
domain: 'example.com',
|
119
|
+
secure: false,
|
120
|
+
httponly: false
|
121
|
+
}, {
|
122
|
+
name: 'zzz',
|
123
|
+
path: '/',
|
124
|
+
domain: 'example.com',
|
125
|
+
secure: true,
|
126
|
+
httponly: false
|
127
|
+
})).to.be.false;
|
128
|
+
});
|
129
|
+
});
|
130
|
+
|
131
|
+
describe('#add', function () {
|
132
|
+
it('should append new cookie', function () {
|
133
|
+
expect(biskviit.cookies.length).to.equal(0);
|
134
|
+
biskviit.add({
|
135
|
+
name: 'zzz',
|
136
|
+
value: 'abc',
|
137
|
+
path: '/',
|
138
|
+
expires: new Date(Date.now() + 10000),
|
139
|
+
domain: 'example.com',
|
140
|
+
secure: false,
|
141
|
+
httponly: false
|
142
|
+
});
|
143
|
+
expect(biskviit.cookies.length).to.equal(1);
|
144
|
+
expect(biskviit.cookies[0].name).to.equal('zzz');
|
145
|
+
expect(biskviit.cookies[0].value).to.equal('abc');
|
146
|
+
});
|
147
|
+
|
148
|
+
it('should update existing cookie', function () {
|
149
|
+
expect(biskviit.cookies.length).to.equal(0);
|
150
|
+
biskviit.add({
|
151
|
+
name: 'zzz',
|
152
|
+
value: 'abc',
|
153
|
+
path: '/',
|
154
|
+
expires: new Date(Date.now() + 10000),
|
155
|
+
domain: 'example.com',
|
156
|
+
secure: false,
|
157
|
+
httponly: false
|
158
|
+
});
|
159
|
+
biskviit.add({
|
160
|
+
name: 'zzz',
|
161
|
+
value: 'def',
|
162
|
+
path: '/',
|
163
|
+
expires: new Date(Date.now() + 10000),
|
164
|
+
domain: 'example.com',
|
165
|
+
secure: false,
|
166
|
+
httponly: false
|
167
|
+
});
|
168
|
+
expect(biskviit.cookies.length).to.equal(1);
|
169
|
+
expect(biskviit.cookies[0].name).to.equal('zzz');
|
170
|
+
expect(biskviit.cookies[0].value).to.equal('def');
|
171
|
+
});
|
172
|
+
});
|
173
|
+
|
174
|
+
describe('#match', function () {
|
175
|
+
it('should check if a cookie matches particular domain and path', function () {
|
176
|
+
var cookie = {
|
177
|
+
name: 'zzz',
|
178
|
+
value: 'abc',
|
179
|
+
path: '/def/',
|
180
|
+
expires: new Date(Date.now() + 10000),
|
181
|
+
domain: 'example.com',
|
182
|
+
secure: false,
|
183
|
+
httponly: false
|
184
|
+
};
|
185
|
+
expect(biskviit.match(cookie, 'http://example.com/def/')).to.be.true;
|
186
|
+
expect(biskviit.match(cookie, 'http://example.com/bef/')).to.be.false;
|
187
|
+
});
|
188
|
+
|
189
|
+
it('should check if a cookie matches particular domain and path', function () {
|
190
|
+
var cookie = {
|
191
|
+
name: 'zzz',
|
192
|
+
value: 'abc',
|
193
|
+
path: '/def',
|
194
|
+
expires: new Date(Date.now() + 10000),
|
195
|
+
domain: 'example.com',
|
196
|
+
secure: false,
|
197
|
+
httponly: false
|
198
|
+
};
|
199
|
+
expect(biskviit.match(cookie, 'http://example.com/def/')).to.be.true;
|
200
|
+
expect(biskviit.match(cookie, 'http://example.com/bef/')).to.be.false;
|
201
|
+
});
|
202
|
+
|
203
|
+
it('should check if a cookie is secure', function () {
|
204
|
+
var cookie = {
|
205
|
+
name: 'zzz',
|
206
|
+
value: 'abc',
|
207
|
+
path: '/def/',
|
208
|
+
expires: new Date(Date.now() + 10000),
|
209
|
+
domain: 'example.com',
|
210
|
+
secure: true,
|
211
|
+
httponly: false
|
212
|
+
};
|
213
|
+
expect(biskviit.match(cookie, 'https://example.com/def/')).to.be.true;
|
214
|
+
expect(biskviit.match(cookie, 'http://example.com/def/')).to.be.false;
|
215
|
+
});
|
216
|
+
});
|
217
|
+
|
218
|
+
describe('#parse', function () {
|
219
|
+
it('should parse Set-Cookie value', function () {
|
220
|
+
|
221
|
+
expect(biskviit.parse('theme=plain')).to.deep.equal({
|
222
|
+
name: 'theme',
|
223
|
+
value: 'plain'
|
224
|
+
});
|
225
|
+
|
226
|
+
expect(biskviit.parse('SSID=Ap4P….GTEq; Domain=foo.com; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly')).to.deep.equal({
|
227
|
+
name: 'ssid',
|
228
|
+
value: 'Ap4P….GTEq',
|
229
|
+
domain: '.foo.com',
|
230
|
+
path: '/',
|
231
|
+
httponly: true,
|
232
|
+
secure: true,
|
233
|
+
expires: new Date('Wed, 13 Jan 2021 22:23:01 GMT')
|
234
|
+
});
|
235
|
+
|
236
|
+
});
|
237
|
+
|
238
|
+
it('should ignore invalid expire header', function () {
|
239
|
+
expect(biskviit.parse('theme=plain; Expires=Wed, 13 Jan 2021 22:23:01 GMT')).to.deep.equal({
|
240
|
+
name: 'theme',
|
241
|
+
value: 'plain',
|
242
|
+
expires: new Date('Wed, 13 Jan 2021 22:23:01 GMT')
|
243
|
+
});
|
244
|
+
|
245
|
+
expect(biskviit.parse('theme=plain; Expires=ZZZZZZZZ GMT')).to.deep.equal({
|
246
|
+
name: 'theme',
|
247
|
+
value: 'plain'
|
248
|
+
});
|
249
|
+
});
|
250
|
+
});
|
251
|
+
|
252
|
+
describe('Listing', function () {
|
253
|
+
beforeEach(function () {
|
254
|
+
biskviit.cookies = [{
|
255
|
+
name: 'ssid1',
|
256
|
+
value: 'Ap4P….GTEq1',
|
257
|
+
domain: '.foo.com',
|
258
|
+
path: '/',
|
259
|
+
httponly: true,
|
260
|
+
secure: true,
|
261
|
+
expires: new Date('Wed, 13 Jan 2021 22:23:01 GMT')
|
262
|
+
}, {
|
263
|
+
name: 'ssid2',
|
264
|
+
value: 'Ap4P….GTEq2',
|
265
|
+
domain: '.foo.com',
|
266
|
+
path: '/',
|
267
|
+
httponly: true,
|
268
|
+
secure: true,
|
269
|
+
expires: new Date('Wed, 13 Jan 1900 22:23:01 GMT')
|
270
|
+
}, {
|
271
|
+
name: 'ssid3',
|
272
|
+
value: 'Ap4P….GTEq3',
|
273
|
+
domain: 'foo.com',
|
274
|
+
path: '/',
|
275
|
+
httponly: true,
|
276
|
+
secure: true,
|
277
|
+
expires: new Date('Wed, 13 Jan 2021 22:23:01 GMT')
|
278
|
+
}, {
|
279
|
+
name: 'ssid4',
|
280
|
+
value: 'Ap4P….GTEq4',
|
281
|
+
domain: 'www.foo.com',
|
282
|
+
path: '/',
|
283
|
+
httponly: true,
|
284
|
+
secure: true,
|
285
|
+
expires: new Date('Wed, 13 Jan 2021 22:23:01 GMT')
|
286
|
+
}, {
|
287
|
+
name: 'ssid5',
|
288
|
+
value: 'Ap4P….GTEq5',
|
289
|
+
domain: 'broo.com',
|
290
|
+
path: '/',
|
291
|
+
httponly: true,
|
292
|
+
secure: true,
|
293
|
+
expires: new Date('Wed, 13 Jan 2021 22:23:01 GMT')
|
294
|
+
}];
|
295
|
+
});
|
296
|
+
|
297
|
+
|
298
|
+
describe('#list', function () {
|
299
|
+
it('should return matching cookies for an URL', function () {
|
300
|
+
expect(biskviit.list('https://www.foo.com')).to.deep.equal([{
|
301
|
+
name: 'ssid1',
|
302
|
+
value: 'Ap4P….GTEq1',
|
303
|
+
domain: '.foo.com',
|
304
|
+
path: '/',
|
305
|
+
httponly: true,
|
306
|
+
secure: true,
|
307
|
+
expires: new Date('Wed, 13 Jan 2021 22:23:01 GMT')
|
308
|
+
}, {
|
309
|
+
name: 'ssid4',
|
310
|
+
value: 'Ap4P….GTEq4',
|
311
|
+
domain: 'www.foo.com',
|
312
|
+
path: '/',
|
313
|
+
httponly: true,
|
314
|
+
secure: true,
|
315
|
+
expires: new Date('Wed, 13 Jan 2021 22:23:01 GMT')
|
316
|
+
}]);
|
317
|
+
});
|
318
|
+
});
|
319
|
+
|
320
|
+
describe('#get', function () {
|
321
|
+
it('should return matching cookies for an URL', function () {
|
322
|
+
expect(biskviit.get('https://www.foo.com')).to.equal('ssid1=Ap4P….GTEq1; ssid4=Ap4P….GTEq4');
|
323
|
+
});
|
324
|
+
});
|
325
|
+
});
|
326
|
+
|
327
|
+
describe('#set', function () {
|
328
|
+
it('should set cookie', function () {
|
329
|
+
// short
|
330
|
+
biskviit.set('theme=plain', 'https://foo.com/');
|
331
|
+
// long
|
332
|
+
biskviit.set('SSID=Ap4P….GTEq; Domain=foo.com; Path=/test; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly', 'https://foo.com/');
|
333
|
+
// subdomains
|
334
|
+
biskviit.set('SSID=Ap4P….GTEq; Domain=.foo.com; Path=/; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly', 'https://www.foo.com/');
|
335
|
+
// invalid cors
|
336
|
+
biskviit.set('invalid_1=cors; domain=example.com', 'https://foo.com/');
|
337
|
+
biskviit.set('invalid_2=cors; domain=www.foo.com', 'https://foo.com/');
|
338
|
+
// invalid date
|
339
|
+
biskviit.set('invalid_3=date; Expires=zzzz', 'https://foo.com/');
|
340
|
+
// invalid tld
|
341
|
+
biskviit.set('invalid_4=cors; domain=.co.uk', 'https://foo.co.uk/');
|
342
|
+
// should not be added
|
343
|
+
biskviit.set('expired_1=date; Expires=1999-01-01 01:01:01 GMT', 'https://foo.com/');
|
344
|
+
|
345
|
+
expect(biskviit.cookies.map(function (cookie) {
|
346
|
+
delete cookie.expires;
|
347
|
+
return cookie;
|
348
|
+
})).to.deep.equal([{
|
349
|
+
name: 'theme',
|
350
|
+
value: 'plain',
|
351
|
+
domain: 'foo.com',
|
352
|
+
path: '/'
|
353
|
+
}, {
|
354
|
+
name: 'ssid',
|
355
|
+
value: 'Ap4P….GTEq',
|
356
|
+
domain: 'foo.com',
|
357
|
+
path: '/test',
|
358
|
+
secure: true,
|
359
|
+
httponly: true
|
360
|
+
}, {
|
361
|
+
name: 'ssid',
|
362
|
+
value: 'Ap4P….GTEq',
|
363
|
+
domain: 'www.foo.com',
|
364
|
+
path: '/',
|
365
|
+
secure: true,
|
366
|
+
httponly: true
|
367
|
+
}, {
|
368
|
+
name: 'invalid_1',
|
369
|
+
value: 'cors',
|
370
|
+
domain: 'foo.com',
|
371
|
+
path: '/'
|
372
|
+
}, {
|
373
|
+
name: 'invalid_2',
|
374
|
+
value: 'cors',
|
375
|
+
domain: 'foo.com',
|
376
|
+
path: '/'
|
377
|
+
}, {
|
378
|
+
name: 'invalid_3',
|
379
|
+
value: 'date',
|
380
|
+
domain: 'foo.com',
|
381
|
+
path: '/'
|
382
|
+
}, {
|
383
|
+
name: 'invalid_4',
|
384
|
+
value: 'cors',
|
385
|
+
domain: 'foo.co.uk',
|
386
|
+
path: '/'
|
387
|
+
}]);
|
388
|
+
});
|
389
|
+
});
|
390
|
+
|
391
|
+
});
|