mirror of
https://github.com/arnaucube/comunicationLeap.git
synced 2026-02-07 03:16:45 +01:00
nodejs with express server, leapmotion for movement control, and threejs for 3d render
This commit is contained in:
1
node_modules/cookie/test/mocha.opts
generated
vendored
Normal file
1
node_modules/cookie/test/mocha.opts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
--ui qunit
|
||||
44
node_modules/cookie/test/parse.js
generated
vendored
Normal file
44
node_modules/cookie/test/parse.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
var assert = require('assert');
|
||||
|
||||
var cookie = require('..');
|
||||
|
||||
suite('parse');
|
||||
|
||||
test('basic', function() {
|
||||
assert.deepEqual({ foo: 'bar' }, cookie.parse('foo=bar'));
|
||||
assert.deepEqual({ foo: '123' }, cookie.parse('foo=123'));
|
||||
});
|
||||
|
||||
test('ignore spaces', function() {
|
||||
assert.deepEqual({ FOO: 'bar', baz: 'raz' },
|
||||
cookie.parse('FOO = bar; baz = raz'));
|
||||
});
|
||||
|
||||
test('escaping', function() {
|
||||
assert.deepEqual({ foo: 'bar=123456789&name=Magic+Mouse' },
|
||||
cookie.parse('foo="bar=123456789&name=Magic+Mouse"'));
|
||||
|
||||
assert.deepEqual({ email: ' ",;/' },
|
||||
cookie.parse('email=%20%22%2c%3b%2f'));
|
||||
});
|
||||
|
||||
test('ignore escaping error and return original value', function() {
|
||||
assert.deepEqual({ foo: '%1', bar: 'bar' }, cookie.parse('foo=%1;bar=bar'));
|
||||
});
|
||||
|
||||
test('ignore non values', function() {
|
||||
assert.deepEqual({ foo: '%1', bar: 'bar' }, cookie.parse('foo=%1;bar=bar;HttpOnly;Secure'));
|
||||
});
|
||||
|
||||
test('unencoded', function() {
|
||||
assert.deepEqual({ foo: 'bar=123456789&name=Magic+Mouse' },
|
||||
cookie.parse('foo="bar=123456789&name=Magic+Mouse"',{
|
||||
decode: function(value) { return value; }
|
||||
}));
|
||||
|
||||
assert.deepEqual({ email: '%20%22%2c%3b%2f' },
|
||||
cookie.parse('email=%20%22%2c%3b%2f',{
|
||||
decode: function(value) { return value; }
|
||||
}));
|
||||
})
|
||||
64
node_modules/cookie/test/serialize.js
generated
vendored
Normal file
64
node_modules/cookie/test/serialize.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
// builtin
|
||||
var assert = require('assert');
|
||||
|
||||
var cookie = require('..');
|
||||
|
||||
suite('serialize');
|
||||
|
||||
test('basic', function() {
|
||||
assert.equal('foo=bar', cookie.serialize('foo', 'bar'));
|
||||
assert.equal('foo=bar%20baz', cookie.serialize('foo', 'bar baz'));
|
||||
});
|
||||
|
||||
test('path', function() {
|
||||
assert.equal('foo=bar; Path=/', cookie.serialize('foo', 'bar', {
|
||||
path: '/'
|
||||
}));
|
||||
});
|
||||
|
||||
test('secure', function() {
|
||||
assert.equal('foo=bar; Secure', cookie.serialize('foo', 'bar', {
|
||||
secure: true
|
||||
}));
|
||||
|
||||
assert.equal('foo=bar', cookie.serialize('foo', 'bar', {
|
||||
secure: false
|
||||
}));
|
||||
});
|
||||
|
||||
test('domain', function() {
|
||||
assert.equal('foo=bar; Domain=example.com', cookie.serialize('foo', 'bar', {
|
||||
domain: 'example.com'
|
||||
}));
|
||||
});
|
||||
|
||||
test('httpOnly', function() {
|
||||
assert.equal('foo=bar; HttpOnly', cookie.serialize('foo', 'bar', {
|
||||
httpOnly: true
|
||||
}));
|
||||
});
|
||||
|
||||
test('maxAge', function() {
|
||||
assert.equal('foo=bar; Max-Age=1000', cookie.serialize('foo', 'bar', {
|
||||
maxAge: 1000
|
||||
}));
|
||||
});
|
||||
|
||||
test('escaping', function() {
|
||||
assert.deepEqual('cat=%2B%20', cookie.serialize('cat', '+ '));
|
||||
});
|
||||
|
||||
test('parse->serialize', function() {
|
||||
|
||||
assert.deepEqual({ cat: 'foo=123&name=baz five' }, cookie.parse(
|
||||
cookie.serialize('cat', 'foo=123&name=baz five')));
|
||||
|
||||
assert.deepEqual({ cat: ' ";/' }, cookie.parse(
|
||||
cookie.serialize('cat', ' ";/')));
|
||||
});
|
||||
|
||||
test('unencoded', function() {
|
||||
assert.deepEqual('cat=+ ', cookie.serialize('cat', '+ ', {
|
||||
encode: function(value) { return value; }
|
||||
}));
|
||||
})
|
||||
Reference in New Issue
Block a user