* ospec: all results, failing and passing, include .message and .context
Previously only failing tests had .message and .context.
* Updated docs
* Function was ugly
* Ospec verbose passing tests: put changelog update in right place
* Ospec: added assertion that function does/doesnt throw error
* Ospec.throws passes npm test
* Ospec.throws: Address requested changes
* Ospec: message comparison support for .throws/.notthrows
Credit to @maranomynet, #2227
- Fix custom elements attribute application to acknowledge that not all
custom elements operate purely based on attributes. (Plus, those
blasted things are verbose as heck when you're working with them in
raw form. It's also not that uncommon for functionality to be exposed
via property and *not* attribute.)
- Don't memoize the normalized value when we 1. only use it once in each
branch, and 2. only use it for a few special cases.
- Centralize the "has property key" code, so it's easier to tune and
read. I also inlined a couple functions while I was at it since they
were small and only used once.
- Actually test for how attributes are applied to raw DOM elements vs
when we choose to use keys. When I first developed the patch, it
silently worked, when I should've been breaking things.
* feat(ospec): Add spacing before report results
...sometimes tested code emits console.log() messages
which then blend in with ospec's report
* feat(ospec): Reword and prettify the report messages
* feat(ospec): Make console.errors more compact, yet more readable
* docs(ospec): Update change-log.md
* fix(ospec): Fix grammar when number of assertions is 1
* feat(ospec): Make "all passed" message bright green
* refactor(ospec): define `cStyle()` helper for browser styling
* feat(ospec): Use en-dashes for the horizontal divider
* feat(ospec): Revert stacktrace coloring, make context bright red
...and add extra newline above each error - for readability
in commandline (node.js) mode
* feat(ospec): Improve the only-test-passed message
"1 assertion passed" --> "The 1 assertion passed"
* docs: Update LOC count
* Allow requires before running tests
This enables requiring modules like `esm` before any test files are loaded.
* Update ospec documentation
Also add documentation for `--require` option
* Update ospec change-log.md
* [opsec] move the change log item to v2.0
* [ospec] tweak the docs
* feat(ospec): CLI support for file-patterns and an --ignore flag
The added dependency is only used by the node.js binary - which normally only ever installed via npm/yarn anyway.
This does not interfer with ospec proper being dependencyless.
* chore(mithril): Add glob dependency needed by the ospec binary
this is only needed while ospec is inlined in the
mithril repo. As soon as ospec is split away into a
standalone npm module, this will not be required anymore.
* refactor(ospec): Use 'match' events instead of callback
Performance should be similar, but the code looks
cleaner and easier to grok.
* Misc tweaks