Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
run test suite in TypeScript in addition to Node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Feb 8, 2018
1 parent 0d942fd commit 268e59b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
7 changes: 7 additions & 0 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// This file is required for the use of process.browser, which is
// not defined in @types/node but a property added by browserify.
declare namespace NodeJS {
interface Process {
browser: boolean;
}
}
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,20 @@
"xtend": "~4.0.0"
},
"devDependencies": {
"@types/node": "^9.3.0",
"rimraf": "^2.6.1",
"sinon": "^4.0.0",
"standard": "^10.0.3",
"tape": "^4.7.0"
"tape": "^4.7.0",
"ts-node": "^4.1.0",
"typescript": "^2.6.2"
},
"browser": {
"rimraf": false
},
"scripts": {
"test": "standard && node test.js"
"test": "standard && node test.js && npm run test-ts",
"test-ts": "ts-node --type-check --no-cache test.js"
},
"license": "MIT",
"engines": {
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"target": "es2015",
"moduleResolution": "node",
"checkJs": true,
"allowJs": true
}
}

0 comments on commit 268e59b

Please sign in to comment.