Comparing version 4.2.0 to 4.2.1
{ | ||
"name": "ospec", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "Noiseless testing framework", | ||
@@ -20,3 +20,3 @@ "main": "ospec.js", | ||
"dependencies": { | ||
"glob": "^7.1.3" | ||
"glob": "^9.0.0" | ||
}, | ||
@@ -38,4 +38,4 @@ "scripts": { | ||
"eslint": "^6.8.0", | ||
"ospec-stable": "npm:ospec@4.1.7" | ||
"ospec-stable": "npm:ospec@4.2.0" | ||
} | ||
} |
# ospec | ||
[![npm License](https://img.shields.io/npm/l/ospec.svg)](https://www.npmjs.com/package/ospec) [![npm Version](https://img.shields.io/npm/v/ospec.svg)](https://www.npmjs.com/package/ospec) [![Build Status](https://img.shields.io/travis/MithrilJS/ospec/master.svg)](https://travis-ci.org/MithrilJS/ospec) [![npm Downloads](https://img.shields.io/npm/dm/ospec.svg)](https://www.npmjs.com/package/ospec) | ||
[![npm License](https://img.shields.io/npm/l/ospec.svg)](https://www.npmjs.com/package/ospec) [![npm Version](https://img.shields.io/npm/v/ospec.svg)](https://www.npmjs.com/package/ospec) ![Build Status](https://img.shields.io/github/actions/workflow/status/MithrilJS/ospec/.github%2Fworkflows%2Fci.yml) [![npm Downloads](https://img.shields.io/npm/dm/ospec.svg)](https://www.npmjs.com/package/ospec) | ||
[![Donate at OpenCollective](https://img.shields.io/opencollective/all/mithriljs.svg?colorB=brightgreen)](https://opencollective.com/mithriljs) [![Gitter](https://img.shields.io/gitter/room/mithriljs/mithril.js.svg)](https://gitter.im/mithriljs/mithril.js) | ||
[![Donate at OpenCollective](https://img.shields.io/opencollective/all/mithriljs.svg?colorB=brightgreen)](https://opencollective.com/mithriljs) [![Zulip, join chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://mithril.zulipchat.com/) | ||
@@ -15,3 +15,3 @@ --- | ||
- ~1100 LOC including the CLI runner<sup>1</sup> | ||
- ~950 LOC including the CLI runner<sup>1</sup> | ||
- terser and faster test code than with mocha, jasmine or tape | ||
@@ -122,3 +122,3 @@ - test code reads like bullet points | ||
o(spy.args[0]).equals(1) | ||
o(spy.calls[0]).deepEquals([1]) | ||
o(spy.calls[0].args).deepEquals([1]) | ||
}) | ||
@@ -161,3 +161,3 @@ }) | ||
Alternativly you can return a promise or even use an async function in tests: | ||
Alternatively you can return a promise or even use an async function in tests: | ||
@@ -544,3 +544,3 @@ ```javascript | ||
Returns a function that records the number of times it gets called, and its arguments | ||
Returns a function that records the number of times it gets called, and each call's arguments | ||
@@ -555,2 +555,6 @@ #### Number o.spy().callCount | ||
#### Array<any> o.spy().calls | ||
An array representing all the times the function was called. Each array value is an object containing the `this` calling context and an `args` array. | ||
--- | ||
@@ -623,3 +627,3 @@ | ||
The `Error` object explaining the reason behind a failure. If the assertion failed, the stack will point to the actuall error. If the assertion did pass or was incomplete, this field is identical to `result.testError`. | ||
The `Error` object explaining the reason behind a failure. If the assertion failed, the stack will point to the actual error. If the assertion did pass or was incomplete, this field is identical to `result.testError`. | ||
@@ -716,3 +720,3 @@ --- | ||
- ...if thrown in a `beforeEach` hook of a streak, causes the streak to be hollowed out. Hooks defined in nested scopes and the actual test will not run. However, the `afterEach` hook corresponding to the one that crashed will run, as will those defined in outer scopes. | ||
For every error thrown, a "bail out" failure is reported. | ||
@@ -724,3 +728,3 @@ | ||
Ospec started as a bare bones test runner optimized for Leo Horie to write Mithril v1 with as little hasle as possible. It has since grown in capabilities and polish, and while we tried to keep some of the original spirit, the current incarnation is not as radically minimalist as the original. The state of the art in testing has also moved with the dominance of Jest over Jasmine and Mocha, and now Vitest coming up the horizon. | ||
Ospec started as a bare bones test runner optimized for Leo Horie to write Mithril v1 with as little hassle as possible. It has since grown in capabilities and polish, and while we tried to keep some of the original spirit, the current incarnation is not as radically minimalist as the original. The state of the art in testing has also moved with the dominance of Jest over Jasmine and Mocha, and now Vitest coming up the horizon. | ||
@@ -727,0 +731,0 @@ - Do the most common things that the mocha/chai/sinon triad does without having to install 3 different libraries and several dozen dependencies |
@@ -13,5 +13,5 @@ // This is a dev script that is shipped with the package because | ||
glob("node_modules/.bin/ospec*(.*)") | ||
glob.globStream("node_modules/.bin/ospec*(.*)") | ||
.on("match", (x) => {count++; rename(x, x.replace(/ospec(?:-stable)?((?:\.\w+)?)/, "ospec-stable$1"))}) | ||
.on("data", (x) => {console.log(x); count++; rename(x, x.replace(/ospec(?:-stable)?((?:\.\w+)?)/, "ospec-stable$1"))}) | ||
@@ -23,1 +23,2 @@ .on("error", (e) => { | ||
.on("end", () => {if (count !== 0) console.log(`We renamed ${count} file${count > 1 ? "s" : ""}`)}) | ||
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58942
738
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedglob@9.3.5(transitive)
+ Addedlru-cache@10.4.3(transitive)
+ Addedminimatch@8.0.4(transitive)
+ Addedminipass@4.2.87.1.2(transitive)
+ Addedpath-scurry@1.11.1(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedglob@^9.0.0