Skip to content

Commit

Permalink
Merge pull request #1760 from kwonoj/test-sauce
Browse files Browse the repository at this point in the history
test(Subject): update test object assertion
  • Loading branch information
kwonoj committed Jun 11, 2016
2 parents f5f0180 + 92ad829 commit b3e85ac
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -191,7 +191,7 @@
"validate-commit-msg": "^2.3.1",
"watch": "^0.17.1",
"watchify": "3.7.0",
"webpack": "^1.12.14",
"webpack": "^1.13.1",
"xmlhttprequest": "1.8.0"
},
"engines": {
Expand Down
5 changes: 3 additions & 2 deletions spec/Subject-spec.ts
Expand Up @@ -459,13 +459,14 @@ describe('Subject', () => {
});

it('should not next after error', () => {
const error = new Error('wut?');
const subject = new Rx.Subject();
const results = [];
subject.subscribe(x => results.push(x), (err) => results.push(err));
subject.next('a');
subject.error(new Error('wut?'));
subject.error(error);
subject.next('b');
expect(results).to.deep.equal(['a', new Error('wut?')]);
expect(results).to.deep.equal(['a', error]);
});

describe('asObservable', () => {
Expand Down
13 changes: 11 additions & 2 deletions spec/support/webpack.mocha.config.js
Expand Up @@ -3,20 +3,29 @@ var path = require('path');
var glob = require('glob');
var webpack = require('webpack');

var files = _.map(glob.sync('spec-js/**/!(mocha-setup-node|mocha.sauce.gruntfile|mocha.sauce.runner|webpack.mocha.config|painter|diagram-test-runner|testScheduler-ui).js'), function (x) {
var files = _.map(glob.sync('spec-js/**/!(mocha-setup-node|mocha.sauce.gruntfile|mocha.sauce.runner|webpack.mocha.config|painter|diagram-test-runner|testScheduler-ui).js'), function(x) {
return path.resolve('./', x);
});

module.exports = {
devtool: '#inline-source-map',

stats: {
colors: true,
assets: false,
chunks: false
},

entry: {
'browser.testscheduler': './spec-js/helpers/testScheduler-ui.js',
'browser.spec': files
},

output: {
path: './tmp/browser',
path: 'tmp/browser',
filename: '[name].js',
},

plugins: [
new webpack.optimize.CommonsChunkPlugin('browser.common.js')
]
Expand Down

0 comments on commit b3e85ac

Please sign in to comment.