Provides Azos base types and services functionality for Java Script apps
ver. 0.0.1 20230923 DKh
rev. 20240918 DKh + KDB
- Unit name: (e.g.
Aver
,Customer
,.myMethod()
)- Should use
PascalCase
unless it is a function-specific unit in which case: - Should start with a dot and follows function name with the
()
at the end, example:.bufToHex()
- Should use
- Case name: (e.g.,
my-case-01
)- Should be lowercase
- Dashes should replace spaces
- Decimal numbers allowed
Since Nov 17, 2023 testing uses
azos/run.js
tiny library (< 300LOC) which replacesmocha
. We could not usemocha
anymore due to its problematic ES module support while bundling for browser which we needed to test against all the time.
You can run test using the following JS runtimes:
- Node
- Browser/s
- Other JS runtimes like
Deno
orBun
- not tried yet
# in the root of azos-js
# Test everything
npm test
# Test named units
# Use `~` to negate the pattern: `~*xyz` = NOT something which ends with `xyz`
npm test "/Aver*"
npm test "/Aver* /Types* ~null"
# Test named cases (may use multiple)
npm test "*/UInt8Array */bufToHex()/throws"
# Test named cases under named units
npm test "*/bufToHex()/throws"
As azos-js
is a purely ES6+ module-based project it is impossible to load test assets using file://
protocol, hence you have to bundle and dev-serve your test suite using Parcel
.
#navigate to http://localhost:1234 in any browser, open a console (hit F12)
npm run test-bro
# Starts parcel server with watch+HMR out of ./out/www (temp testing)
# http://localhost:1234
npm run ui
Portions of this work are based on other open source projects, each having their respective licenses:
- Stock icon images provided by Google Fonts/Material Design Icons https://fonts.google.com/icons under Apache 2.0 License https://github.com/google/material-design-icons/blob/master/LICENSE
- Parcel Bundler https://parceljs.org/ MIT License https://github.com/parcel-bundler/parcel/blob/v2/LICENSE
- The project build uses Node.js v.18+ https://github.com/nodejs/node/blob/main/LICENSE