Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 }
});
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({
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 }
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() {
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']
};
});
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']
};
});
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;
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',
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();
});
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);
});