Skip to content

Commit

Permalink
fix #719
Browse files Browse the repository at this point in the history
  • Loading branch information
errorx666 authored and pubkey committed Jul 31, 2018
1 parent 80f2648 commit c2b5c2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export function validateCouchDBString(name) {
const regStr = '^[a-z][a-z0-9]*$';
const reg = new RegExp(regStr);
if (!name.match(reg)) {
throw new RxError.newRxError('UT2', {
throw RxError.newRxError('UT2', {
regex: regStr,
givenName: name,
});
Expand Down
3 changes: 2 additions & 1 deletion test/unit/util.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ describe('util.test.js', () => {
describe('negative', () => {
it('should not validate a spaced string', () => {
assert.throws(
() => util.validateCouchDBString('foo bar')
() => util.validateCouchDBString('foo bar'),
{ code: 'UT2' }
);
});
});
Expand Down

0 comments on commit c2b5c2e

Please sign in to comment.