How to use the cyclejs.Rx.internals function in cyclejs

To help you get started, we’ve selected a few cyclejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github erykpiast / cyclejs-mock / test / inject-testing-utils.spec.js View on Github external
/* global suite, test */

import chai from 'chai';
import { assert } from 'chai';

import spies from 'chai-spies';
import spiesTdd from 'chai-spies-tdd';

chai.use(spies);
chai.use(spiesTdd);

import { Rx, h } from 'cyclejs';

import equalCollection from 'chai-equal-collection';

chai.use(equalCollection(Rx.internals.isEqual));

import injectTestingUtils from '../src/inject-testing-utils';

suite('injectTestingUtils', () => {

    test('should be a function', () => {
        assert.isFunction(injectTestingUtils);
    });

    test('should throw if argument is not a function', () => {
        assert.throws(() => injectTestingUtils());

        assert.throws(() => injectTestingUtils({}));

        assert.throws(() => injectTestingUtils([]));
    });
github erykpiast / autocompleted-select / src / js / spec / model.spec.js View on Github external
/* global suite, test */

import chai from 'chai';
import { assert } from 'chai';

// has to be imported before Rx
import inject from 'cyclejs-mock';

import { Rx } from 'cyclejs';
import each from 'foreach';

import model from '../model';

chai.use(require('chai-equal-collection')(Rx.internals.isEqual));


suite('model', () => {

    suite('API', () => {

        test('Should be an object with functions as properties', () => {

            assert.isObject(model);

            each(model, (prop) => assert.isFunction(prop));
        });

    });
github erykpiast / autocompleted-select / src / js / spec / view.spec.js View on Github external
/* global suite, test */

import chai from 'chai';
import { assert } from 'chai';

// has to be imported before Rx
import inject from 'cyclejs-mock';

import { Rx } from 'cyclejs';

import view from '../view';

chai.use(require('chai-equal-collection')(Rx.internals.isEqual));


suite('view', () => {

    suite('API', () => {

        test('Should be a function', () => {

            assert.isFunction(view);

        });

    });

    suite('I/O', () => {
github erykpiast / autocompleted-select / src / js / spec / intent.spec.js View on Github external
/* global suite, test */

import chai from 'chai';
import { assert } from 'chai';

// has to be imported before Rx
import inject from 'cyclejs-mock';

import { Rx } from 'cyclejs';
import each from 'foreach';

import intent from '../intent';

chai.use(require('chai-equal-collection')(Rx.internals.isEqual));


suite('intent', () => {

    suite('API', () => {

        test('Should be an object with functions as properties', () => {

            assert.isObject(intent);

            each(intent, (prop) => assert.isFunction(prop));
        });

    });