Skip to content

Commit

Permalink
fixed test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly-t committed Nov 16, 2019
1 parent 90373f1 commit 354e2af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "connection-string",
"version": "3.0.4",
"version": "3.0.5",
"description": "Advanced URL Connection String parser + generator.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -41,13 +41,13 @@
"devDependencies": {
"@types/chai": "4.2.5",
"@types/mocha": "5.2.7",
"@types/node": "12.12.7",
"@types/node": "12.12.8",
"chai": "4.2.0",
"coveralls": "3.0.7",
"mocha": "6.2.2",
"mocha-lcov-reporter": "1.3.0",
"nyc": "14.1.1",
"ts-node": "8.5.0",
"ts-node": "8.5.2",
"tslint": "5.20.1",
"typescript": "3.7.2"
}
Expand Down
5 changes: 3 additions & 2 deletions test/main.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {expect} from './header';
import {ConnectionString, IConnectionDefaults, HostType, IHost, IParsedHost} from '../src';
import {ConnectionString, IConnectionDefaults, HostType, IHost, IParsedHost} from '../dist';

function parse(cs: string, defaults?: IConnectionDefaults): ConnectionString {
return new ConnectionString(cs, defaults);
Expand All @@ -24,7 +24,8 @@ function create(defaults: IConnectionDefaults): string {
describe('init', () => {
it('must throw when used as a function', () => {
expect(() => {
(ConnectionString as any)();
const test: any = ConnectionString;
test();
}).to.throw('Class constructor ConnectionString cannot be invoked without \'new\'');
});
it('must throw on a non-string', () => {
Expand Down

0 comments on commit 354e2af

Please sign in to comment.