18e86ebfe7
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. |
||
---|---|---|
.. | ||
TokenDaoTest.ts |