diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-09-04 21:21:47 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-09-04 21:30:18 +0200 |
commit | 0e1dc3e7c69995c691e1dd82e3c2bc68748661ca (patch) | |
tree | f2a4b5cffc72e33c902b67083bbaa35b6f22f0ca /scripts | |
parent | b0f9f39ed70299a208d1b388c72de8b7f3510cb7 (diff) | |
download | PeerTube-0e1dc3e7c69995c691e1dd82e3c2bc68748661ca.tar.gz PeerTube-0e1dc3e7c69995c691e1dd82e3c2bc68748661ca.tar.zst PeerTube-0e1dc3e7c69995c691e1dd82e3c2bc68748661ca.zip |
Convert tests to typescript
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/reset-password.ts | 4 | ||||
-rwxr-xr-x | scripts/test.sh | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/reset-password.ts b/scripts/reset-password.ts index 09f27bfa4..5ab7d01e5 100755 --- a/scripts/reset-password.ts +++ b/scripts/reset-password.ts | |||
@@ -6,14 +6,14 @@ program | |||
6 | .option('-u, --user [user]', 'User') | 6 | .option('-u, --user [user]', 'User') |
7 | .parse(process.argv) | 7 | .parse(process.argv) |
8 | 8 | ||
9 | if (program.user === undefined) { | 9 | if (program['user'] === undefined) { |
10 | console.error('All parameters are mandatory.') | 10 | console.error('All parameters are mandatory.') |
11 | process.exit(-1) | 11 | process.exit(-1) |
12 | } | 12 | } |
13 | 13 | ||
14 | db.init(true) | 14 | db.init(true) |
15 | .then(() => { | 15 | .then(() => { |
16 | return db.User.loadByUsername(program.user) | 16 | return db.User.loadByUsername(program['user']) |
17 | }) | 17 | }) |
18 | .then(user => { | 18 | .then(user => { |
19 | if (!user) { | 19 | if (!user) { |
diff --git a/scripts/test.sh b/scripts/test.sh index 6c6312d52..b193a10bc 100755 --- a/scripts/test.sh +++ b/scripts/test.sh | |||
@@ -7,4 +7,4 @@ npm test || exit -1 | |||
7 | 7 | ||
8 | cd .. || exit -1 | 8 | cd .. || exit -1 |
9 | npm run tslint -- --type-check --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" || exit -1 | 9 | npm run tslint -- --type-check --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" || exit -1 |
10 | mocha --bail server/tests | 10 | mocha --require ts-node/register --bail server/tests/index.ts |