Skip to content

Commit

Permalink
chore: tests can now be written in typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchuech committed Jul 8, 2016
1 parent 3f752b9 commit 8373c62
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
coverage/
dist
typings
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
src
spec
coverage
typings
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
"scripts": {
"prepublish": "npm run clean && npm run build && npm test",
"clean": "rimraf dist",
"test": "istanbul cover jasmine",
"test": "npm run prepare-spec && istanbul cover jasmine && npm run clean-spec",
"test-travis": "istanbul cover jasmine && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage",
"build": "gulp && tsc",
"watch": "gulp watch",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"prepare-spec": "cd spec && copyfiles **/*.spec.js *.spec.js ../buildspec && cd .. && tsc -p tsconfig.spec.json",
"clean-spec": "rimraf buildspec"
},
"repository": {
"type": "git",
Expand All @@ -28,6 +30,7 @@
"author": "Dennis Saenger <[email protected]>",
"license": "MIT",
"devDependencies": {
"copyfiles": "^1.0.0",
"coveralls": "2.11.4",
"git-changelog": "0.1.8",
"grunt": "0.4.5",
Expand All @@ -41,9 +44,10 @@
"jasmine": "2.3.2",
"proxyquire": "1.7.3",
"rimraf": "2.4.3",
"source-map-support": "0.3.2",
"semantic-release": "^4.3.5",
"typescript": "^1.8.10"
"source-map-support": "0.3.2",
"typescript": "^1.8.10",
"typings": "^1.3.1"
},
"dependencies": {
"babel-runtime": "5.8.25"
Expand Down
2 changes: 1 addition & 1 deletion spec/support/jasmine.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.js"
"../buildspec/**/*[sS]pec.js"
],
"helpers": [
"helpers/**/*.js"
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
},

"exclude": [
"node_modules"
"node_modules",
"spec",
"dist"
]
}
33 changes: 33 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"rules": {
"class-name": true,
"indent": [true, "spaces"],
"no-duplicate-variable": true,
"no-eval": true,
"no-internal-module": true,
"no-trailing-whitespace": true,
"no-var-keyword": true,
"one-line": true,
"quotemark": [true, "single"],
"semicolon": true,
"triple-equals": true,
"typedef-whitespace": [true, {
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}],
"variable-name": [true, "ban-keywords"],
"whitespace": [true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
"eofline": true,
"max-line-length": [true, 100],
"no-consecutive-blank-lines": true
}
}
6 changes: 6 additions & 0 deletions typings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"globalDependencies": {
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
"node": "registry:dt/node#6.0.0+20160621231320"
}
}

0 comments on commit 8373c62

Please sign in to comment.