1 | "use strict";
|
2 |
|
3 | var _asyncMapOperations = require("./async-map-operations");
|
4 |
|
5 | test('asyncMapSetOperation', function () {
|
6 | expect((0, _asyncMapOperations.asyncMapSetOperation)({}, 'a')).toEqual({
|
7 | a: true
|
8 | });
|
9 | expect((0, _asyncMapOperations.asyncMapSetOperation)({}, 'a', 'custom')).toEqual({
|
10 | a: 'custom'
|
11 | });
|
12 | });
|
13 | test('asyncMapDeleteOperation', function () {
|
14 | var s = {
|
15 | foo: 'foo',
|
16 | bar: 'bar'
|
17 | };
|
18 | expect((0, _asyncMapOperations.asyncMapDeleteOperation)(s, 'foo')).toEqual({
|
19 | bar: 'bar'
|
20 | });
|
21 | });
|
22 | test('asyncMapClearOperation', function () {
|
23 | var s = {
|
24 | foo: 'foo',
|
25 | bar: 'bar'
|
26 | };
|
27 | expect((0, _asyncMapOperations.asyncMapClearOperation)(s)).toEqual({});
|
28 | expect((0, _asyncMapOperations.asyncMapClearOperation)(s, 'foo')).toEqual({
|
29 | foo: 'foo'
|
30 | });
|
31 | }); |
\ | No newline at end of file |