This PR adds unit testing as a separate Jest test suite.
Jest's .not.toThrow() assertion was not added because TypeScript will not allow anything other than string to be passed to a function whose parameter is defined as having the type of string, anyway. The type guard typeof ref === 'string' exists for the loosely typed JavaScript only.
This PR adds unit testing as a separate Jest test suite.
Jest's
.not.toThrow()
assertion was not added because TypeScript will not allow anything other thanstring
to be passed to a function whose parameter is defined as having the type ofstring
, anyway. The type guardtypeof ref === 'string'
exists for the loosely typed JavaScript only.