Skip to content

Commit

Permalink
Add Tests
Browse files Browse the repository at this point in the history
Add Some Unit Tests
  • Loading branch information
harry-sm committed Dec 14, 2017
1 parent a965101 commit 0783b93
Show file tree
Hide file tree
Showing 7 changed files with 431 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,8 @@ typings/
# dotenv environment variables file
.env

# credential settings
src/tests/api-credentials-settings.ts

# End of https://www.gitignore.io/api/node

# End of https://www.gitignore.io/api/node
223 changes: 222 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"build": "tsc",
"prepublish": "npm run build",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha -r ts-node/register ./src/tests/index.ts"
},
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down Expand Up @@ -44,8 +44,12 @@
"signalr-client": "0.0.17"
},
"devDependencies": {
"@types/chai": "^4.0.10",
"@types/mocha": "^2.2.44",
"@types/node-fetch": "^1.6.7",
"@types/signalr": "^2.2.34",
"chai": "^4.1.2",
"mocha": "^4.0.1",
"ts-node": "^3.3.0",
"typescript": "^2.6.1"
}
Expand Down
7 changes: 7 additions & 0 deletions src/tests/api-credentials-settings-format.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

export class ApiCredentialsSettings {
static key: string = null;
static secret: string = null;
}


2 changes: 2 additions & 0 deletions src/tests/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import './public-tests';
import './private-tests';
Loading

0 comments on commit 0783b93

Please sign in to comment.