Commit graph

38 commits

Author SHA1 Message Date
Matias Kinnunen
2b5c2f0fc6
Fix inconsistent capitalizations of "JavaScript" (#2639) 2020-11-08 15:05:17 -08:00
Pierre-Yves Gérardy
4a3a486d80
Pimp the docs linter (and assorted changes) (#2553)
### Pimp the docs linter (and assorted changes)

 #### `scripts/lint-docs.js`

- Add an optional cache for faster runs
- Add a final report
- Don't return anything from `exec()`
- Cover more files

 #### `scripts/_command.js`

- Look for a "--cache" option

 #### `package.json` scripts

- Added `watch:lint-docs`
- Added `cleanup:lint` to remove the eslint and lint-docs cache files
- Changed `lint:docs` to use the `--cache` option
- Added `test:js` so that we can run the test suite without the linter
- Changed `test` to defer to `test:js`

 #### Actual lint fixes:

- Bad link in a migration guide
- The unicode dashes in the "https://en.wikipedia.org/wiki/Subject–verb–object" are not escaped by marked

### Some more lint-docs pimping

#### `scripts/lint-docs.js`

- some code reorg and cleanup (take a hint from the local coding conventions)
- fix misc bugs
- pass a User-Agent header to the requests
- even nicer reporting

#### `package.json`

- bump the @babel/parser dep to the latest

#### Docs

- tweaks based on lints missed due to previous bugs

### Docs: use the github page for velocity.js, the home page has too many errors.

Co-Authored-By: Isiah Meadows <contact@isiahmeadows.com>
2019-12-19 23:40:52 +01:00
Isiah Meadows
234b1c9302 Update migration, fix various minor issues
- Lot of people couldn't migrate to v1 and plan to reevaluate when v2 is
  released.
- It's "npm" not "NPM". It doesn't stand for anything, and it never
  has - it was initially chosen simply because it was easy to type.
  It has a lot of unofficial backronyms with "Node Package Manager"
  being one of the most common ones, but it's never officially stood
  for anything as an acronym *or* initialism.
- Fixed a few errors in the change log, like non-breaking changes being
  included in the "Breaking Changes" section and an inaccuracy in the
  summary of a particular change.
- Fixed RawGit URLs to point to GitHack, which is a lighter proxy that
  offloads caching to Cloudflare instead of also implementing it itself.
  (It also just uses nginx for all the important server logic, so it
  scales better.)
- Add a few more v0.2 references as appropriate
2019-07-24 05:01:20 -04:00
Robin (Robert) Thomas
b5219920ab Ospec: expose messages for passing tests, in addition to failing tests (#2227)
* 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
2018-11-21 15:47:10 -05:00
Robin (Robert) Thomas
0fd1bc9cae Add 'throws'/'notThrows' assertion to Ospec for error reporting (#2255)
* 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
2018-11-21 15:46:34 -05:00
Isiah Meadows
2635070734 Merge branch 'next' 2018-10-25 14:23:33 -04:00
Isiah Meadows
f844cc8134 Add functionality for inspecting arbitrary past calls
This made it much easier to debug multiple calls while developing this
patch.
2018-09-20 15:08:49 -04:00
Pierre-Yves Gérardy
9016091adf [ospec] docs and change log 2018-06-01 20:22:58 +02:00
Pierre-Yves Gérardy
24875832e9
[ospec] Document changes made to the result objects. 2018-05-29 23:02:23 +02:00
Pierre-Yves Gérardy
0484758837 [ospec] docs and change log tweaks 2018-05-29 22:42:20 +02:00
Pierre-Yves Gérardy
aa0f9eae98 [ospec] o.defaultTimeout => o.specTimeout, and documentation.
The timeout parameter is deprecated but will still work for now
2018-05-29 22:42:20 +02:00
Már Örlygsson
2794ceb76f [ospec] Make the default reporting nicer looking (#2147)
* 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
2018-05-22 18:19:54 +02:00
Gilbert
91b08c6491 Add --require feature to ospec executable (#2144)
* 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
2018-05-09 17:46:55 +02:00
Már Örlygsson
cfaa377c1e [ospec] feat: nicer binary with support for globs (#2141)
* 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
2018-05-07 01:32:01 +02:00
Pierre-Yves Gérardy
5bbaac4259 ospec: tests and docs for o.report 2017-12-01 00:29:38 +01:00
Pierre-Yves Gérardy
7caebddcb2 ospec: better stack trace filter, fix #2036 2017-12-01 00:28:59 +01:00
Pierre-Yves Gérardy
a96e4d8aa6 Readme: adjust the LOC count 2017-12-01 00:28:35 +01:00
Pierre-Yves Gérardy
3ac17d0075 ospec: tests and docs for o.report 2017-11-30 23:52:52 +01:00
Pierre-Yves Gérardy
b84e09369e ospec: better stack trace filter, fix #2036 2017-11-30 16:10:14 +01:00
Pierre-Yves Gérardy
cd3c1afca2 Readme: adjust the LOC count 2017-11-30 00:27:48 +01:00
Sage Gerard
4a72829985 feat(ospec): Allow custom reporters for CI reasons (#2019) (#2020) 2017-11-29 17:03:38 +01:00
Stephan Hoyer
9b5afff52e Support promise return in ospec 2017-11-29 16:49:54 +01:00
Sage Gerard
78eeb2b365 feat(ospec): Allow custom reporters for CI reasons (#2019) (#2020) 2017-11-20 15:37:07 -08:00
Stephan Hoyer
b345e4f023 Support promise return in ospec 2017-08-31 19:31:08 +02:00
Pat Cavit
a2390c63fb ospec@1.3.0 2017-07-12 21:05:44 -07:00
Pat Cavit
6502cc366d docs: update ospec so version/license are automatic 2017-07-12 21:04:09 -07:00
Pierre-Yves Gérardy
d65fd020cd [ospec:docs] test suites can now be named [skip ci] 2017-07-09 17:04:26 +02:00
Pierre-Yves Gerardy
ee6d991e51 [ospec:docs] Document the fact that ospec doesn't work when installed globally 2017-01-22 10:43:48 +01:00
Leo
d40b324645 doc fixes 2017-01-08 14:47:38 -05:00
Leo Horie
9ad16858a5 #1520 ospec: report duplicate test names 2017-01-08 13:05:27 -05:00
Leo Horie
b62663bdc1 ensure properties in arrays are tested #1497 2016-12-31 19:27:23 -05:00
Leo
50b8b498c5 bump ospec version 2016-12-07 18:39:21 -05:00
Leo Horie
249050e4c2 bump ospec version 2016-11-15 10:01:12 -05:00
Leo Horie
4dd66a7e65 don't send undefined body 2016-11-10 10:12:05 -05:00
Douglas Brown
d02a238bf0 💁 Adjust ospec bin def, add to README
Getting set up with ospec is deceptively simple, and adding just a bit
more documentation should help new users from falling into the trap of
overthinking the test config.  (I know that I ended up down a very
strange rabbit hole when pulling ospec into a project).

This also adjusts the bin definition in the package file so that we can
hopefully just use the `ospec` command instead of a folder ref.
2016-10-14 13:27:44 -04:00
Leo Horie
f0888ac7bd make spy decorator 2016-08-30 14:05:53 -04:00
impinball
b4fb21475c Add editorconfig, resolve differences
This includes newlines, tabs, among other things.
2016-06-18 03:22:12 -04:00
Leo Horie
559369016d initial commit (work in progress) 2016-04-20 20:02:37 -04:00