1
0
Fork 0
liza/test/server
Mike Gerwitz 18e86ebfe7 TokenDao: Add test and further refine types
This tests the existing state of TokenDao before additional modifications
are made.  This commit also further refines the types introduced in a
previous commit.

This is also the first test written in Typescript.

* package.json.in (devDependencies): Add node, chai, and mocha types.
* src/server/token/TokenDao.ts (updateToken): `data` accepts null (as it
    should).  Do not conditionall add data to object (it doesn't matter for
    later retrieval).  Note nondeterminism with date.  More concise syntax
    for object fields.
* src/server/token/TokenQueryResult.ts: Make all fields readonly.
  (TokenStatus): Date is no longer optional (see above mention).
* src/types/mongodb.d.ts: Remove generics (erroneously added).
  (Collection)[update]: Remove 3-argument declaration (see comment).
* test/server/token/TokenDaoTest.ts: New test case.
2019-10-17 11:47:14 -04:00
..
db Copyright range update 2019-08-30 09:41:35 -04:00
meta Copyright range update 2019-08-30 09:41:35 -04:00
quote Copyright range update 2019-08-30 09:41:35 -04:00
request Copyright range update 2019-08-30 09:41:35 -04:00
service Copyright range update 2019-08-30 09:41:35 -04:00
token TokenDao: Add test and further refine types 2019-10-17 11:47:14 -04:00