Documentation and code for all the latest @augment-vir
packages.
@augment-vir/assert
: A collection of assertions for test and production code alike. These main exports are the following:assert
: a collection of assertion methods with type guards when possible. Example:assert.isDefined()
check
: a collection of boolean check methods with type guards when possible. Example:check.isBoolean()
assertWrap
: a collection of assertions that return the asserted value if the assertion passes. ExamplesassertWrap.isArray()
checkWrap
: a collection of checks that return the checked value if it passes orundefined
. Example:checkWrap.isInfinite()
waitUntil
: a collection of assertion methods that try to wait until the assertion becomes true. Example:waitUntil.isTruthy()
@augment-vir/common
: A collection of augments, helpers types, functions, and classes for any JavaScript environment.- Examples:
filterObject
,wait
,getEnumValues
- Includes a colored logger implementation:
log
- Includes a SQL-select-like runtime implementation of TypeScript's
Pick
:selectFrom
- Includes Prisma type helpers.
- and much more...
- Examples:
@augment-vir/node
: A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments.- Includes a custom Prisma API built on its CLI:
prisma
. - Includes a custom Docker API built on its CLI:
docker
. - Includes an easy to use shell script runner:
runShellCommand
. - and much more!
- Includes a custom Prisma API built on its CLI:
@augment-vir/test
: A universal testing suite that works with Mocha style test runners and Node.js's built-in test runner with the following main exports:describe
: the normal describe test suite function, automatically imported based on the current environment.it
: the normal it test function, automatically imported based on the current environment.itCases
: a succinct way to test lots of inputs and outputs to a single function.testWeb
: a API of web-testing utilities, only available in browser environments.
@augment-vir/web
: A collection of augments, helpers types, functions, and classes, that only work in a browser JavaScript environment.- Includes a
querySelector
implementation that works with Shadow DOM:queryThroughShadow
. - Includes an easy way to list all nested children of an element:
getNestedChildren
. - and much more!
- Includes a