Test cleanup and fixes [o-p]

This commit is contained in:
Angelos Chalaris
2018-06-18 18:00:19 +03:00
parent 9f95330528
commit 072728dad2
35 changed files with 164 additions and 262 deletions

View File

@ -1,12 +1,9 @@
const expect = require('expect');
const parseCookie = require('./parseCookie.js');
test('parseCookie is a Function', () => {
test('parseCookie is a Function', () => {
expect(parseCookie).toBeInstanceOf(Function);
});
test('Parses the cookie', () => {
expect(parseCookie('foo=bar; equation=E%3Dmc%5E2'), { foo: 'bar', equation: 'E=mc^2' }).toEqual()
test('Parses the cookie', () => {
expect(parseCookie('foo=bar; equation=E%3Dmc%5E2')).toEqual({ foo: 'bar', equation: 'E=mc^2' });
});