Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(test): reorder test cases #1459

Merged
merged 2 commits into from
Mar 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ module.exports = function (config) {
browserName: 'chrome',
version: '46'
},
/*sl_chrome_beta: {
sl_chrome_beta: {
base: 'SauceLabs',
browserName: 'chrome',
version: 'beta'
},
/*
sl_chrome_dev: {
base: 'SauceLabs',
browserName: 'chrome',
Expand All @@ -24,14 +25,14 @@ module.exports = function (config) {
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
version: '42'
version: '44'
},
sl_firefox_beta: {
/*sl_firefox_beta: {
base: 'SauceLabs',
browserName: 'firefox',
version: 'beta'
},
/*sl_firefox_dev: {
sl_firefox_dev: {
base: 'SauceLabs',
browserName: 'firefox',
version: 'dev'
Expand Down
48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,51 +141,51 @@
},
"homepage": "https://github.com/ReactiveX/RxJS",
"devDependencies": {
"babel-polyfill": "6.5.0",
"benchmark": "1.0.0",
"babel-polyfill": "^6.7.2",
"benchmark": "^2.1.0",
"benchpress": "2.0.0-beta.1",
"browserify": "13.0.0",
"color": "^0.11.1",
"colors": "1.1.2",
"commitizen": "2.5.0",
"coveralls": "2.11.6",
"commitizen": "^2.7.2",
"coveralls": "^2.11.8",
"cz-conventional-changelog": "1.1.5",
"esdoc": "0.4.6",
"eslint": "2.2.0",
"fs-extra": "0.24.0",
"ghooks": "0.3.2",
"glob": "5.0.14",
"esdoc": "^0.4.6",
"eslint": "^2.4.0",
"fs-extra": "^0.26.5",
"ghooks": "^1.0.3",
"glob": "^7.0.3",
"gm": "1.21.1",
"google-closure-compiler": "20160125.0.0",
"google-closure-compiler": "^20160208.5.0",
"gzip-size": "^3.0.0",
"http-server": "0.8.0",
"http-server": "^0.9.0",
"istanbul": "0.4.2",
"jasmine": "2.4.1",
"jasmine-ajax": "3.2.0",
"jasmine-core": "2.4.1",
"karma": "0.13.21",
"karma": "^0.13.22",
"karma-browserify": "5.0.2",
"karma-chrome-launcher": "0.2.2",
"karma-jasmine": "0.3.7",
"karma-sauce-launcher": "0.3.0",
"lodash": "4.1.0",
"karma-sauce-launcher": "^0.3.1",
"lodash": "^4.6.1",
"madge": "^0.5.3",
"markdown-doctest": "^0.3.2",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"npm-scripts-info": "^0.3.4",
"platform": "1.3.0",
"promise": "7.0.3",
"protractor": "2.5.1",
"platform": "^1.3.1",
"promise": "^7.1.1",
"protractor": "^3.1.1",
"remap-istanbul": "0.5.1",
"rx": "latest",
"systemjs": "^0.19.6",
"rx": "^4.1.0",
"systemjs": "^0.19.24",
"systemjs-builder": "^0.10.6",
"tslint": "3.4.0",
"typescript": "1.8.2",
"typings": "^0.6.10",
"validate-commit-msg": "1.1.1",
"watch": "0.16.0",
"tslint": "^3.5.0",
"typescript": "^1.8.7",
"typings": "^0.7.8",
"validate-commit-msg": "^2.3.1",
"watch": "^0.17.1",
"watchify": "3.7.0",
"xmlhttprequest": "1.8.0"
},
Expand Down
45 changes: 23 additions & 22 deletions spec/operators/publishBehavior-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,6 @@ describe('Observable.prototype.publishBehavior', () => {
published.connect();
});

it('should follow the RxJS 4 behavior and NOT allow you to reconnect by subscribing again', (done: DoneSignature) => {
const expected = [0, 1, 2, 3, 4];
let i = 0;

const source = Observable.of(1, 2, 3, 4).publishBehavior(0);

source.subscribe(
(x: number) => {
expect(x).toBe(expected[i++]);
},
done.fail,
() => {
source.subscribe((x: any) => {
done.fail('should not be called');
}, done.fail, done);

source.connect();
});

source.connect();
});

it('should return a ConnectableObservable', () => {
const source = Observable.of(1).publishBehavior(1);
expect(source instanceof Rx.ConnectableObservable).toBe(true);
Expand Down Expand Up @@ -347,4 +325,27 @@ describe('Observable.prototype.publishBehavior', () => {
expect(results).toEqual([]);
done();
});

it('should follow the RxJS 4 behavior and NOT allow you to reconnect by subscribing again', (done: DoneSignature) => {
const expected = [0, 1, 2, 3, 4];
let i = 0;

const source = Observable.of(1, 2, 3, 4).publishBehavior(0);

source.subscribe(
(x: number) => {
expect(x).toBe(expected[i++]);
},
done.fail,
() => {
source.subscribe((x: any) => {
done.fail('should not be called');
}, done.fail, done);

source.connect();
});

source.connect();
});

});
Loading