Skip to content

Commit

Permalink
refactoring tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly-t committed Nov 16, 2019
1 parent 354e2af commit a51eb8b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/main.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ function create(defaults: IConnectionDefaults): string {
return (new ConnectionString('', defaults)).toString();
}

describe('init', () => {
describe('constructor', () => {
it('must throw when used as a function', () => {
expect(() => {
const test: any = ConnectionString;
test();
(ConnectionString as any)();
}).to.throw('Class constructor ConnectionString cannot be invoked without \'new\'');
});
it('must throw on a non-string', () => {
Expand Down

0 comments on commit a51eb8b

Please sign in to comment.