How to use the rx/dist/rx.testing.TestScheduler 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 / bamboo / bambooRequests.spec.js View on Github external
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 / services / teamcity / teamcityRequests.spec.js View on Github external
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 / core / services / serviceController.spec.js View on Github external
beforeEach(function() {
        settings = {
            baseUrl: 'test',
            url: 'http://www.example.com/',
            name: 'service name',
            projects: [],
            disabled: false
        };
        serviceStartResponse = Rx.Observable.return([]);
        spyOn(CustomBuildService.prototype, 'start').and.callFake(function() {
            this.events.onNext({ eventName: 'serviceStarted' });
            return serviceStartResponse;
        });
        spyOn(CustomBuildService.prototype, 'stop');
        controller.registerType(CustomBuildService);
        scheduler = new Rx.TestScheduler();

    });
github AdamNowotny / BuildReactor / src / core / services / travis / travisBuild.spec.js View on Github external
beforeEach(function() {
			scheduler = new Rx.TestScheduler();
			isRunning = false;
			settings = {
				name: 'My Travis CI',
				icon: 'travis/icon.png',
				username: 'AdamNowotny',
				updateInterval: 10000,
				projects: ['AdamNowotny/BuildReactor']
			};
			buildsJson = JSON.parse(buildFixture);
			buildsRunningJson = JSON.parse(buildsRunningFixture);
			buildDetailsJson = JSON.parse(buildDetailsFixture);
			buildDetailsRunningJson = JSON.parse(buildDetailsRunningFixture);
			spyOn(request, 'json').and.callFake(function(options) {
				switch (options.url) {
				case 'https://api.travis-ci.org/repositories/AdamNowotny/BuildReactor/builds.json':
					return Rx.Observable.return(isRunning ? buildsRunningJson : buildsJson);
github AdamNowotny / BuildReactor / src / core / services / request.spec.js View on Github external
beforeEach(() => {
            scheduler = new Rx.TestScheduler();
            stub = new StubSuperagent();
            spyOn(superagent, 'get').and.returnValue(stub);
        });
github AdamNowotny / BuildReactor / src / services / buildbot / buildbotRequests.spec.js View on Github external
beforeEach(() => {
        scheduler = new Rx.TestScheduler();
        settings = {
            name: 'My CI',
            username: 'username',
            password: 'password',
            url: 'http://example.com/',
            updateInterval: 10000,
            projects: ['project1', 'project2']
        };
    });
github AdamNowotny / BuildReactor / src / core / events.spec.js View on Github external
beforeEach(() => {
	scheduler = new Rx.TestScheduler();
});
github AdamNowotny / BuildReactor / src / services / travis / travis.spec.js View on Github external
beforeEach(() => {
        scheduler = new Rx.TestScheduler();
        sinon.stub(requests, 'repositories');
        sinon.stub(requests, 'builds');
    });