Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: MithrilJS/ospec
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.1.1
Choose a base ref
...
head repository: MithrilJS/ospec
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.1.2
Choose a head ref

Commits on Apr 7, 2020

  1. Copy the full SHA
    be8a399 View commit details

Commits on Jul 20, 2020

  1. Bump lodash from 4.17.15 to 4.17.19 (#22)

    Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
    - [Release notes](https://github.com/lodash/lodash/releases)
    - [Commits](lodash/lodash@4.17.15...4.17.19)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jul 20, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8bbb5b8 View commit details

Commits on Aug 2, 2020

  1. markdown + minor content cleanup (#23)

    * markdown + minor content cleanup
    
    * reverted definition os streak
    pakx authored Aug 2, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4cea4c3 View commit details

Commits on May 11, 2021

  1. Create auto-merge.yml

    dead-claudia authored May 11, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0d6c130 View commit details
  2. Bump lodash from 4.17.19 to 4.17.21 (#34)

    Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
    - [Release notes](https://github.com/lodash/lodash/releases)
    - [Commits](lodash/lodash@4.17.19...4.17.21)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 11, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e799a6a View commit details

Commits on Jun 9, 2021

  1. Update auto-merge.yml

    dead-claudia authored Jun 9, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b47a4e1 View commit details

Commits on Aug 12, 2021

  1. Delete auto-merge.yml

    dead-claudia authored Aug 12, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6fa4e6d View commit details

Commits on Mar 26, 2022

  1. Bump minimist from 1.2.5 to 1.2.6 (#39)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 26, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1f505da View commit details
  2. Bump glob-parent from 5.1.0 to 5.1.2 (#36)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 26, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4aff69a View commit details

Commits on May 16, 2022

  1. Copy the full SHA
    ead33fd View commit details
  2. Copy the full SHA
    c221a4e View commit details
  3. fix typo

    pygy committed May 16, 2022
    Copy the full SHA
    112f0f0 View commit details
  4. Get rid of the old style count

    pygy committed May 16, 2022
    Copy the full SHA
    ecc2e96 View commit details
  5. Copy the full SHA
    93c213b View commit details
  6. Copy the full SHA
    e59218b View commit details
  7. Use GitHub Actions for CI

    pygy committed May 16, 2022
    Copy the full SHA
    aed3753 View commit details
  8. remove stray console.log calls

    pygy committed May 16, 2022
    Copy the full SHA
    bead548 View commit details
  9. npm audit fix

    pygy committed May 16, 2022
    Copy the full SHA
    b1f64dc View commit details
  10. v4.1.2

    pygy committed May 16, 2022
    Copy the full SHA
    21a37bb View commit details
  11. remove .travis.yml

    pygy committed May 16, 2022
    Copy the full SHA
    c28b251 View commit details
  12. update the docs

    pygy committed May 16, 2022
    Copy the full SHA
    df843d6 View commit details
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on: [push, pull_request]

jobs:
tests:
runs-on: ${{ matrix.os }}
name: Node.js ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }} with ${{ matrix.shell }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node_version:
- 14
- 16
- 18
architecture:
- x64
shell :
- bash
include:
- os: windows-latest
shell: cmd
node_version: 14
- os: windows-latest
shell: powershell
node_version: 14
- os: windows-latest
shell: pwsh
node_version: 14
- os: windows-latest
shell: cmd
node_version: 16
- os: windows-latest
shell: powershell
node_version: 16
- os: windows-latest
shell: pwsh
node_version: 16
- os: windows-latest
shell: cmd
node_version: 18
- os: windows-latest
shell: powershell
node_version: 18
- os: windows-latest
shell: pwsh
node_version: 18
steps:
# https://github.com/actions/checkout#Push-a-commit-using-the-built-in-token
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
- run: npm ci
- run: corepack enable
- run: npm run test
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

329 changes: 163 additions & 166 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bin/ospec
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ const loaderDetected = new Promise((fulfill, reject) => {
// at run time...
// eslint-disable-next-line no-eval
eval(`
import('./non-existant-file').catch((e)=>{
import('file:./non-existent-file').catch((e)=>{
if (e.message.includes('Not supported')) reject()
else fulfill()
})`)
@@ -21,7 +21,7 @@ const loaderDetected = new Promise((fulfill, reject) => {
}
}).then(
// eslint-disable-next-line no-eval, no-unused-vars
() => (x) => eval("import(x)"),
() => (x) => eval("import('file:' + x)"),
// eslint-disable-next-line global-require
() => async (x) => require(x)
)
6 changes: 4 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -16,9 +16,11 @@
Change log
======

### Upcoming...
### 4.1.2

nothing yet
#### Bug fixes
_2022-05-17_
- Properly handle ES6 modules in Widows ([#30](https://github.com/MithrilJS/ospec/pull/30), closes (#35)[https://github.com/MithrilJS/ospec/issues/35]

### 4.1.1
_2020-04-07_
12 changes: 4 additions & 8 deletions ospec.js
Original file line number Diff line number Diff line change
@@ -250,7 +250,6 @@ else window.o = m()
if (isRunning()) throw new Error("`o.run()` has already been called")
results = []
stats = {
asyncSuccesses: 0,
bailCount: 0,
onlyCalledAt: onlyCalledAt
}
@@ -416,8 +415,6 @@ else window.o = m()
+ o.cleanStackTrace(task.error))
}

// temporary, for the "old style count" report
if (!threw && task.error != null) {stats.asyncSuccesses++}

if (!isFinalized) finalize(err, threw, false)
}
@@ -717,7 +714,7 @@ else window.o = m()
}

o.report = function (results, stats) {
if (stats == null) stats = {bailCount: 0, asyncSuccesses: 0}
if (stats == null) stats = {bailCount: 0}
var errCount = -stats.bailCount
for (var i = 0, r; r = results[i]; i++) {
if (!r.pass) {
@@ -739,7 +736,6 @@ else window.o = m()
}
var pl = results.length === 1 ? "" : "s"

var oldTotal = " (old style total: " + (results.length + stats.asyncSuccesses) + ")"
var total = results.length - stats.bailCount
var message = [], log = []

@@ -748,12 +744,12 @@ else window.o = m()
if (name) message.push(name + ": ")

if (errCount === 0 && stats.bailCount === 0) {
message.push(highlight((pl ? "All " : "The ") + total + " assertion" + pl + " passed" + oldTotal, "green"))
message.push(highlight((pl ? "All " : "The ") + total + " assertion" + pl + " passed", "green"))
log.push(cStyle("green" , true), cStyle(null))
} else if (errCount === 0) {
message.push((pl ? "All " : "The ") + total + " assertion" + pl + " passed" + oldTotal)
message.push((pl ? "All " : "The ") + total + " assertion" + pl + " passed")
} else {
message.push(highlight(errCount + " out of " + total + " assertion" + pl + " failed" + oldTotal, "red2"))
message.push(highlight(errCount + " out of " + total + " assertion" + pl + " failed", "red2"))
log.push(cStyle("red" , true), cStyle(null))
}

1,463 changes: 1,424 additions & 39 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ospec",
"version": "4.1.1",
"version": "4.1.2",
"description": "Noiseless testing framework",
"main": "ospec.js",
"unpkg": "ospec.js",
@@ -19,14 +19,19 @@
"glob": "^7.1.3"
},
"scripts": {
"test": "ospec tests/test-*.js",
"test-api": "ospec tests/test-api.js",
"test-cli": "ospec tests/test-cli.js",
"postinstall": "node scripts/rename-stable-binaries.js",
"test": "ospec-stable tests/test-*.js",
"test-api": "ospec-stable tests/test-api.js",
"test-cli": "ospec-stable tests/test-cli.js",
"self-test": "node ./bin/ospec tests/test-*.js",
"self-test-api": "node ./bin/ospec tests/test-api.js",
"self-test-cli": "node ./bin/ospec tests/test-cli.js",
"lint": "eslint . bin/ospec"
},
"devDependencies": {
"compose-regexp": "0.4.0",
"cmd-shim": "4.0.2",
"compose-regexp": "0.6.22",
"eslint": "^6.8.0",
"ospec": "4.0.1"
"ospec-stable": "npm:ospec@4.1.1-and-then-some"
}
}
57 changes: 14 additions & 43 deletions releasing.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,18 @@
# Mithril Release Processes
# Releasing ospec

**Note** These steps all assume that `MithrilJS/mithril.js` is a git remote named `mithriljs`, adjust accordingly if that doesn't match your setup.
This was originally tied to the Mithril release cycle, of which nothing remains.

- [Releasing a new Mithril version](#releasing-a-new-mithril-version)
- [Updating mithril.js.org](#updating-mithriljsorg)
- [Releasing a new ospec version](#releasing-a-new-ospec-version)
Currently, the process is manual:

1. Ensure your local branch is up to date
1. check that the test suite passes, both locally and in the GH actions (bar some timeout flakiness)
2. check that we're at the current `master` tip; if not, check it out and goto 1.
3. check that the git tree is clean; if not, check it out and goto 1.
4. verify that the change log is up to date. Update it if needed.
5. verify that the readme is up to date. Update it if needed (check the LOC stats and the API docs).
6. bump the version number in `package.json`.
7. commit, tag and push.
8. npm publish

```bash
$ git checkout next
$ git pull --rebase mithriljs master
```

2. Determine patch level of the change
3. Update `version` field in `ospec/package.json` to match new version being prepared for release.
4. Update `ospec/changelog.md` to match new version being prepared for release.
- Don't forget to add today's date under the version heading!
5. Commit changes to `master`

```bash
$ git add .
$ git commit -m "v<version>"

# Push to your branch
$ git push

# Push to MithrilJS/mithril.js
$ git push mithriljs master
```

6. Ensure the tests are passing!

### Publish the release

7. Push the changes to `MithrilJS/mithril.js`

```bash
$ git push mithriljs master
```

8. Publish the changes to npm.

```bash
$ npm publish
```
9. \o/
|
/ \
2 changes: 1 addition & 1 deletion scripts/build-done-parser.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict"

const {sequence, either, suffix, capture} = require("compose-regexp")
import { sequence, either, suffix, capture } from "compose-regexp"
const zeroOrMore = suffix("*")
const maybe = suffix("?")

8 changes: 4 additions & 4 deletions scripts/logger.js
Original file line number Diff line number Diff line change
@@ -2,10 +2,10 @@

// TODO: properly document this

const o = require("ospec")
const {report} = o
const {writeFileSync, mkdirSync} = require("fs")
const {join} = require("path")
import o, { report } from "ospec"

import { writeFileSync, mkdirSync } from "fs"
import { join } from "path"

console.log("Logging...")
mkdirSync("./logs", {recursive: true})
1 change: 1 addition & 0 deletions scripts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "module"}
14 changes: 14 additions & 0 deletions scripts/rename-stable-binaries.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {rename as fsRename} from "node:fs/promises"
import glob from "glob"

function rename(x) {
fsRename(x, x.replace(/ospec(?:-stable)?((?:\.\w+)?)/, "ospec-stable$1"))
}

glob("./node_modules/.bin/ospec*(.*)")
.on("match", rename)
.on("error", (e) => {
console.error(e)
process.exit(1)
})
.on("end", () => {process.exit(0)})
3 changes: 3 additions & 0 deletions tests/fixtures/metadata/cjs/default1.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@


"use strict"
console.log(__filename + " ran")

const o = require("ospec")


o.spec(__filename, function() {

o("test", function() {
3 changes: 3 additions & 0 deletions tests/fixtures/metadata/cjs/default2.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@


"use strict"
console.log(__filename + " ran")

const o = require("ospec")


o.spec(__filename, function() {

o("test", function() {
3 changes: 3 additions & 0 deletions tests/fixtures/metadata/cjs/override.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@


"use strict"
console.log(__filename + " ran")

const o = require("ospec")


o.metadata({file: "foo"})

o.spec(__filename, function() {

o("test", function() {
21 changes: 15 additions & 6 deletions tests/fixtures/metadata/config.js
Original file line number Diff line number Diff line change
@@ -8,23 +8,29 @@ exports["package.json"] = {
}
}

const isWindows = process.platform === "win32"

const cjsFileName = "__filename"
const esmFileName =
isWindows ? String.raw`import.meta.url.slice(8).replace(/\//g, '\\')`:
"import.meta.url.slice(7)"



const cjsHeader = `
"use strict"
console.log(__filename + " ran")
console.log(${cjsFileName} + " ran")
const o = require("ospec")
`

const esmHeader = `
"use strict"
console.log(import.meta.url.slice(7) + " ran")
console.log(${esmFileName} + " ran")
import {default as o} from 'ospec'
`

const cjsFileName = "__filename"
const esmFileName = "import.meta.url.slice(7)"

const override = `
o.metadata({file: "foo"})
`
@@ -43,7 +49,10 @@ o("test", function() {
})
`

const file = (header, middle, filename) => `${header}${middle}o.spec(${filename}, function() {
const file = (header, middle, filename) => `
${header}
${middle}
o.spec(${filename}, function() {
${test}
})`

3 changes: 3 additions & 0 deletions tests/fixtures/metadata/esm/default1.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@


"use strict"
console.log(import.meta.url.slice(7) + " ran")

import {default as o} from 'ospec'


o.spec(import.meta.url.slice(7), function() {

o("test", function() {
3 changes: 3 additions & 0 deletions tests/fixtures/metadata/esm/default2.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@


"use strict"
console.log(import.meta.url.slice(7) + " ran")

import {default as o} from 'ospec'


o.spec(import.meta.url.slice(7), function() {

o("test", function() {
3 changes: 3 additions & 0 deletions tests/fixtures/metadata/esm/override.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@


"use strict"
console.log(import.meta.url.slice(7) + " ran")

import {default as o} from 'ospec'


o.metadata({file: "foo"})

o.spec(import.meta.url.slice(7), function() {

o("test", function() {
8 changes: 4 additions & 4 deletions tests/fixtures/success/cjs/package.json
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@
"default": "ospec",
"explicit-one": "ospec ./explicit/explicit1.js",
"explicit-several": "ospec ./explicit/explicit1.js ./explicit/explicit2.js",
"explicit-glob": "ospec './explicit/*.js'",
"ignore-one": "ospec --ignore 'tests/main2.js'",
"ignore-one-glob": "ospec --ignore 'very/**/*.js'",
"ignore-several": "ospec --ignore 'very/**' --ignore tests/main2.js",
"explicit-glob": "ospec \"explicit/*.js\"",
"ignore-one": "ospec --ignore tests/main2.js",
"ignore-one-glob": "ospec --ignore \"very/**/*.js\"",
"ignore-several": "ospec --ignore \"very/**\" --ignore tests/main2.js",
"preload-one": "ospec --preload ./main.js",
"preload-several": "ospec --preload ./main.js --preload ./other.js",
"require-one": "ospec --require ./main.js",
8 changes: 4 additions & 4 deletions tests/fixtures/success/config.js
Original file line number Diff line number Diff line change
@@ -6,12 +6,12 @@ exports["package.json"] = {
"default": "ospec",
"explicit-one": "ospec ./explicit/explicit1.js",
"explicit-several": "ospec ./explicit/explicit1.js ./explicit/explicit2.js",
"explicit-glob": "ospec './explicit/*.js'",
"explicit-glob": `ospec "explicit/*.js"`,
// TODO investigate why --ignore is so capricious
// `tests/test2.js` works, but `./tests/test2.js` doesn't.
"ignore-one": "ospec --ignore 'tests/main2.js'",
"ignore-one-glob": "ospec --ignore 'very/**/*.js'",
"ignore-several": "ospec --ignore 'very/**' --ignore tests/main2.js",
"ignore-one": "ospec --ignore tests/main2.js",
"ignore-one-glob": `ospec --ignore "very/**/*.js"`,
"ignore-several": `ospec --ignore "very/**" --ignore tests/main2.js`,
"preload-one": "ospec --preload ./main.js",
"preload-several": "ospec --preload ./main.js --preload ./other.js",
"require-one": "ospec --require ./main.js",
8 changes: 4 additions & 4 deletions tests/fixtures/success/esm/package.json
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@
"default": "ospec",
"explicit-one": "ospec ./explicit/explicit1.js",
"explicit-several": "ospec ./explicit/explicit1.js ./explicit/explicit2.js",
"explicit-glob": "ospec './explicit/*.js'",
"ignore-one": "ospec --ignore 'tests/main2.js'",
"ignore-one-glob": "ospec --ignore 'very/**/*.js'",
"ignore-several": "ospec --ignore 'very/**' --ignore tests/main2.js",
"explicit-glob": "ospec \"explicit/*.js\"",
"ignore-one": "ospec --ignore tests/main2.js",
"ignore-one-glob": "ospec --ignore \"very/**/*.js\"",
"ignore-several": "ospec --ignore \"very/**\" --ignore tests/main2.js",
"preload-one": "ospec --preload ./main.js",
"preload-several": "ospec --preload ./main.js --preload ./other.js",
"require-one": "ospec --require ./main.js",
46 changes: 24 additions & 22 deletions tests/test-api.js
Original file line number Diff line number Diff line change
@@ -12,11 +12,11 @@ if (typeof require !== "undefined") {
var loadFromDeps = (
typeof process !== "undefined"
&& process.argv.length >= 2
&& process.argv[1].match(/ospec[\/\\]node_modules[\/\\]\.bin[\/\\]ospec$/)
&& process.argv[1].match(/ospec-stable/)
)
/* eslint-disable global-require */
o = lib = require("../ospec")
if (loadFromDeps) o = require("ospec")
if (loadFromDeps) o = require("ospec-stable")
/* eslint-enable global-require */
} else {
o = lib = window.o
@@ -152,7 +152,7 @@ o.spec("no output", function() {
oo.run(function(results, stats){
try {
o(results).deepEquals([])
o(stats).deepEquals({asyncSuccesses: 0, bailCount: 0, onlyCalledAt: []})
o(stats).deepEquals({bailCount: 0, onlyCalledAt: []})
if (spy.callCount !== 2) done("spy was called "+spy.callCount+" times, expected 2")
else done()
} catch (e) {
@@ -740,7 +740,7 @@ o.spec("no output", function() {
oo.run(function(results, stats) {
try {
o(results).deepEquals([])
o(stats).deepEquals({asyncSuccesses: 6, bailCount: 0, onlyCalledAt: []})
o(stats).deepEquals({bailCount: 0, onlyCalledAt: []})
finished()
} catch (e) {
finished(e)
@@ -840,7 +840,7 @@ o.spec("no output", function() {
false, false, false, false, false, false, false,
false, false, false, false, false, false, false
])
o(stats).deepEquals({asyncSuccesses: 0, bailCount: 14, onlyCalledAt: []})
o(stats).deepEquals({bailCount: 14, onlyCalledAt: []})
finished()
} catch (e) {
finished(e)
@@ -1008,6 +1008,10 @@ o.spec("no output", function() {
})
})
o.spec("o.specTimeout", function() {
var shortDelay = 10
var middleDelay = 50
var longDelay = 200

o("throws when called inside of test definitions", function(done) {
var oo = lib.new()

@@ -1034,7 +1038,7 @@ o.spec("no output", function() {
var oo = lib.new()
var t

oo.specTimeout(10)
oo.specTimeout(shortDelay)
oo.beforeEach(function () {
t = new Date
})
@@ -1065,18 +1069,19 @@ o.spec("no output", function() {
var oo = lib.new()
var t

oo.specTimeout(50)

oo.specTimeout(middleDelay)
oo.beforeEach(function () {
t = new Date
})
oo.afterEach(function () {
var diff = new Date - t
o(diff >= 50).equals(true)
o(diff < 80).equals(true)
o(diff >= middleDelay).equals(true)
o(diff < longDelay).equals(true)
})

oo.spec("nested 1", function () {
oo.specTimeout(80)
oo.specTimeout(longDelay)
})

oo("", function() {
@@ -1110,7 +1115,7 @@ o.spec("no output", function() {
o("nested suites inherit the specTimeout", function(done) {
var oo = lib.new()

oo.specTimeout(50)
oo.specTimeout(middleDelay)
oo.spec("nested", function () {
oo.spec("deeply", function() {
var t
@@ -1120,8 +1125,8 @@ o.spec("no output", function() {
})
oo.afterEach(function () {
var diff = new Date - t
o(diff >= 50).equals(true)
o(diff < 80).equals(true)
o(diff >= middleDelay).equals(true)
o(diff < longDelay).equals(true)
})

oo("", function() {
@@ -1426,10 +1431,9 @@ o.spec("no output", function() {
}
)
*/}))
oo.run(function(results, stats){
oo.run(function(results){
try {
o(results.length).equals(1)
o(stats.asyncSuccesses).equals(1)
done()
} catch (e) {
done(e)
@@ -1449,10 +1453,9 @@ o.spec("no output", function() {
}
)
*/}))
oo.run(function(results, stats){
oo.run(function(results){
try {
o(results.length).equals(1)
o(stats.asyncSuccesses).equals(1)
done()
} catch (e) {
done(e)
@@ -1517,10 +1520,9 @@ o.spec("no output", function() {
}
)
*/}))
oo.run(function(results, stats){
oo.run(function(results){
try {
o(results.length).equals(1)
o(stats.asyncSuccesses).equals(1)
done()
} catch (e) {
done(e)
@@ -1821,7 +1823,7 @@ o.spec("no output", function() {
oo.run(function(results, stats) {
try {
o(getsFiveandThrowsError.callCount).equals(1)
o(stats).deepEquals({asyncSuccesses: 0, bailCount: 1, onlyCalledAt: []})
o(stats).deepEquals({bailCount: 1, onlyCalledAt: []})
o(results.length).equals(1)
o(results[0].pass).equals(false)
o(results[0].message).equals("An Error")
@@ -2124,7 +2126,7 @@ o.spec("no output", function() {
try {
o(spy.callCount).equals(2)
o(results).deepEquals([])
o(stats).deepEquals({asyncSuccesses: 0, bailCount: 0, onlyCalledAt: []})
o(stats).deepEquals({bailCount: 0, onlyCalledAt: []})
done()
} catch (e) {
done(e)
@@ -2145,7 +2147,7 @@ o.spec("reporting", function() {
function makeError(msg) {try{throw msg ? new Error(msg) : new Error} catch(e){return e}}
try {
var results = [{pass: true}, {pass: true}]
results.bailCount = results.asyncSuccesses = 0
results.bailCount = 0
var errCount = oo.report(results)

o(errCount).equals(0)
1,035 changes: 578 additions & 457 deletions tests/test-cli.js

Large diffs are not rendered by default.