UNPKG

760 BJavaScriptView Raw
1"use strict";
2
3var _pageDataOperations = require("./page-data-operations");
4
5test('pageDataAddOperation', function () {
6 expect((0, _pageDataOperations.pageDataAddOperation)({}, {
7 a: 'a'
8 })).toEqual({
9 a: 'a'
10 });
11 expect((0, _pageDataOperations.pageDataAddOperation)({
12 a: 'a',
13 b: 'b'
14 }, {
15 b: 'X',
16 c: 'c'
17 })).toEqual({
18 a: 'a',
19 b: 'X',
20 c: 'c'
21 });
22});
23test('pageDataDeleteOperation', function () {
24 var s = {
25 foo: 'foo',
26 bar: 'bar'
27 };
28 expect((0, _pageDataOperations.pageDataDeleteOperation)(s, 'foo')).toEqual({
29 bar: 'bar'
30 });
31});
32test('clearDataOperation', function () {
33 var s = {
34 foo: 'foo',
35 bar: 'bar'
36 };
37 expect((0, _pageDataOperations.pageDataClearOperation)(s)).toEqual({});
38});
\No newline at end of file