How to use the rx/dist/rx.testing.ReactiveTest function in rx

To help you get started, we’ve selected a few rx 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 AdamNowotny / BuildReactor / src / services / buildkite / buildkiteRequests.spec.js View on Github external
describe('services/buildkite/buildkiteRequests', () => {

    const onNext = Rx.ReactiveTest.onNext;
    const onCompleted = Rx.ReactiveTest.onCompleted;
    const token = 'token';

    let scheduler;

    beforeEach(() => {
        scheduler = new Rx.TestScheduler();
    });

    describe('organizations', () => {

        it('should pass request parameters', () => {
            spyOn(request, 'get').and.callFake((data) => {
                expect(data).toEqual({
                    url: 'https://api.buildkite.com/v2/organizations',
                    query: { access_token: token }
                });
github AdamNowotny / BuildReactor / src / services / travis / travisRequests.spec.js View on Github external
describe('services/travis/travisRequests', () => {

    const onNext = Rx.ReactiveTest.onNext;
    const onCompleted = Rx.ReactiveTest.onCompleted;
    const settings = {
        apiUrl: 'https://api.travis-ci.org',
        token: 'TOKEN'
    };

    let scheduler;

    beforeEach(() => {
        scheduler = new Rx.TestScheduler();
    });

    describe('repositories', () => {

        it('should pass request parameters', () => {
            spyOn(request, 'get').and.callFake((data) => {
                expect(data).toEqual({
github AdamNowotny / BuildReactor / src / services / buildkite / buildkiteRequests.spec.js View on Github external
describe('services/buildkite/buildkiteRequests', () => {

    const onNext = Rx.ReactiveTest.onNext;
    const onCompleted = Rx.ReactiveTest.onCompleted;
    const token = 'token';

    let scheduler;

    beforeEach(() => {
        scheduler = new Rx.TestScheduler();
    });

    describe('organizations', () => {

        it('should pass request parameters', () => {
            spyOn(request, 'get').and.callFake((data) => {
                expect(data).toEqual({
                    url: 'https://api.buildkite.com/v2/organizations',
                    query: { access_token: token }
github AdamNowotny / BuildReactor / src / core / services / jenkins / buildService.spec.js View on Github external
describe('core/services/jenkins/buildService', function() {

		var onNext = Rx.ReactiveTest.onNext;
		var onCompleted = Rx.ReactiveTest.onCompleted;
		var settings;
		var service;

		beforeEach(function() {
			settings = {
				typeName: 'Jenkins',
				baseUrl: 'jenkins',
				icon: 'jenkins/icon.png',
				url: 'http://ci.jenkins-ci.org/',
				name: 'Jenkins instance',
				projects: ['BuildReactor']
			};
			service = new BuildService(settings);
		});

		it('should set Build factory method', function() {
github AdamNowotny / BuildReactor / src / services / teamcity / teamcityRequests.spec.js View on Github external
describe('services/teamcity/teamcityRequests', () => {

    const onNext = Rx.ReactiveTest.onNext;
    const onCompleted = Rx.ReactiveTest.onCompleted;
    let settings;

    let scheduler;

    beforeEach(() => {
        scheduler = new Rx.TestScheduler();
        settings = {
            name: 'My CI',
            username: 'username',
            password: 'password',
            url: 'http://example.com/',
            updateInterval: 10000,
            projects: ['ID1', 'ID2']
        };
    });
github AdamNowotny / BuildReactor / src / services / bamboo / bambooRequests.spec.js View on Github external
describe('services/bamboo/bambooRequests', () => {

    const onNext = Rx.ReactiveTest.onNext;
    const onCompleted = Rx.ReactiveTest.onCompleted;
    let settings;

    let scheduler;

    beforeEach(() => {
        scheduler = new Rx.TestScheduler();
        settings = {
            name: 'My Bamboo CI',
            username: 'username',
            password: 'password',
            url: 'http://example.com/',
            updateInterval: 10000,
            projects: ['PROJECT1-PLAN1', 'PROJECT2-PLAN2']
        };
    });
github AdamNowotny / BuildReactor / src / core / services / serviceController.spec.js View on Github external
describe('core/services/serviceController', function() {

		let service;
		var onNext = Rx.ReactiveTest.onNext;

		function CustomBuildService(settings) {
			service = this;
			this.events = new Rx.Subject();
			this.initialActiveProjects = {
				name: settings.name,
				items: []
			};
			this.activeProjects = new Rx.BehaviorSubject(this.initialActiveProjects);
			this.settings = settings;
		}
		CustomBuildService.prototype.start = function() {};
		CustomBuildService.prototype.stop = function() {};
		CustomBuildService.settings = () => settings;

		var settings;
github AdamNowotny / BuildReactor / src / core / services / travis / travisBuild.spec.js View on Github external
describe('core/services/travis/travisBuild', function() {

		var onNext = Rx.ReactiveTest.onNext;
		var onCompleted = Rx.ReactiveTest.onCompleted;
		var settings;
		var build;
		var buildsJson,
			buildsRunningJson,
			buildDetailsJson,
			buildDetailsRunningJson;
		var isRunning;
		var scheduler;

		beforeEach(function() {
			scheduler = new Rx.TestScheduler();
			isRunning = false;
			settings = {
				name: 'My Travis CI',
				icon: 'travis/icon.png',
				username: 'AdamNowotny',
github AdamNowotny / BuildReactor / src / services / cctray / cctray.spec.js View on Github external
describe('services/cctray/cctray', () => {

    const onNext = Rx.ReactiveTest.onNext;
    const onCompleted = Rx.ReactiveTest.onCompleted;
    let scheduler;
    let settings;

    beforeEach(() => {
        scheduler = new Rx.TestScheduler();
        sinon.stub(requests, 'projects');

        settings = {
            url: 'http://example.com/',
            projects: ['id']
        };
    });

    afterEach(() => {
        requests.projects.restore();
    });
github AdamNowotny / BuildReactor / src / core / services / jenkins / buildService.spec.js View on Github external
describe('core/services/jenkins/buildService', function() {

		var onNext = Rx.ReactiveTest.onNext;
		var onCompleted = Rx.ReactiveTest.onCompleted;
		var settings;
		var service;

		beforeEach(function() {
			settings = {
				typeName: 'Jenkins',
				baseUrl: 'jenkins',
				icon: 'jenkins/icon.png',
				url: 'http://ci.jenkins-ci.org/',
				name: 'Jenkins instance',
				projects: ['BuildReactor']
			};
			service = new BuildService(settings);
		});