all files / common/models/split-combine/ split-combine.mocha.js

100% Statements 5/5
100% Branches 0/0
100% Functions 2/2
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39                                                                   
"use strict";
var tester_1 = require('immutable-class/build/tester');
var split_combine_1 = require('./split-combine');
describe('SplitCombine', function () {
    it('is an immutable class', function () {
        tester_1.testImmutableClass(split_combine_1.SplitCombine, [
            {
                expression: { op: 'ref', name: 'language' }
            },
            {
                expression: { op: 'ref', name: 'lookup' }
            },
            {
                expression: { op: 'ref', name: 'time' },
                bucketAction: {
                    action: 'in',
                    expression: {
                        'op': 'literal',
                        'value': { 'setType': 'STRING', 'elements': ['he'] },
                        'type': 'SET'
                    }
                },
                sortAction: {
                    action: 'sort',
                    direction: 'ascending',
                    expression: {
                        op: 'ref',
                        name: 'time'
                    }
                },
                limitAction: {
                    action: 'limit',
                    limit: 2
                }
            }
        ]);
    });
});