Skip to content
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
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ script:
- npm install
- npm run test-coverage

after_success: 'npm run coveralls'
after_success:
- npm run coveralls
2 changes: 1 addition & 1 deletion dist/operationkit.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/operationkit.min.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/BlockOperation.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class BlockOperation extends Operation {
}
} else if (typeof first === 'function') {
block = first;
} else {
throw new Error('Wrong arguments passed: missing ID and/or function');
}

super(id);
Expand Down
9 changes: 9 additions & 0 deletions tests/BlockOperation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ describe('BlockOperation', () => {
expect(operation.id).toEqual(1);
expect(runFunction).toHaveBeenCalled();
});

test('it should throw error if no parameters are passed in', (done) => {
try {
const operation = new BlockOperation();
fail('should have failed at this point');
} catch (e) {
done();
}
});
});

describe('function start', () => {
Expand Down