Socket
Socket
Sign inDemoInstall

ospec

Package Overview
Dependencies
11
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0 to 4.1.1

9

changelog.md

@@ -23,4 +23,11 @@ # Change log for ospec

### 4.1.1
_2020-04-07_
#### Bug fixes
- Fix the runner for Node.js v12 (which parses dynamic `import()` calls, but rejects the promise)
- Fix various problems with the tests
### 4.1.0
_2019-08-18_
_2020-04-06_

@@ -27,0 +34,0 @@ - General cleanup and source comments. Drop the "300 LOC" pretense. `ospec` has grown quite a bit, possibly to the point where it needs a new name, since the lib has diverged quite a bit from its original philosophy ([#18](https://github.com/MithrilJS/ospec/pull/18))

6

ospec.js

@@ -223,2 +223,3 @@ "use strict"

}
/* eslint-disable indent */
var nextTickish = hasProcess

@@ -235,2 +236,3 @@ ? process.nextTick

}
/* eslint-enable indent */
o.metadata = function(opts) {

@@ -708,3 +710,3 @@ if (arguments.length === 0) {

console.warn(
highlight("\n/!\\ WARNING /!\\ o.only() called...\n", colors.term),
highlight("\nWarning: o.only() called...\n", colors.term),
colors.web, ""

@@ -714,3 +716,3 @@ )

console.warn(
highlight("\n/!\\ WARNING /!\\ o.only()\n", colors.term),
highlight("\nWarning: o.only()\n", colors.term),
colors.web, ""

@@ -717,0 +719,0 @@ )

{
"name": "ospec",
"version": "4.1.0",
"version": "4.1.1",
"description": "Noiseless testing framework",

@@ -5,0 +5,0 @@ "main": "ospec.js",

@@ -588,3 +588,3 @@ ospec [![npm Version](https://img.shields.io/npm/v/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 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)

When an error is thrown some tests may be skipped. See the "run time semantics" for a detailed description of the bailout mechanism.
When an error is thrown some tests may be skipped. See the "run time model" for a detailed description of the bailout mechanism.

@@ -677,11 +677,11 @@ ---

### The three phases
### The phases of an ospec run
For a given instance, an `ospec` run goes through three phases:
1) test definitions
1) test execution and results accumulation
1) tests definition
1) tests execution and results accumulation
1) results presentation
#### Test definition
#### Tests definition

@@ -692,3 +692,3 @@ This phase is synchronous. `o.spec("spec name", function specDef() {})`, `o("test name", function test() {})` and hooks calls generate a tree of specs and tests.

At test-run time, for each spec, the `before` hook is called if present, then nested specs the streak of each test, in definition order, then the `after` hook, if present.
At test execution time, for each spec, the `before` hook is called if present, then nested specs the streak of each test, in definition order, then the `after` hook, if present.

@@ -709,7 +709,7 @@ Test and hooks may contain assertions, which will populate the `results` array.

- An error thrown in a spec definition will cause the spec to be ignored.
- At test-run time:
- At test-execution time:
- An error thrown in the `before` hook will cause the streaks and nested specs to be ignored. The `after` hook will run.
- An error thrown in a task...
- ...prevents further streaks and nested specs in the current spec from running. The `after` *hook* of the spec will run.
- ...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. The `afterEach` hookcorresponding to the one that crashed will run though as will those defined in outer scopes.
- ...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. The `afterEach` hook corresponding to the one that crashed will run though as will those defined in outer scopes.

@@ -716,0 +716,0 @@ For every error thrown, a "bail out" failure is reported.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc