Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-csl

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-csl - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json
{
"name": "jest-csl",
"version": "0.2.0",
"version": "0.2.1",
"main": "index.js",

@@ -5,0 +5,0 @@ "repository": "https://github.com/cormacrelf/jest-csl",

@@ -178,3 +178,3 @@ # `jest-csl`

- [ { id: "doe2001", locator: "5", label: "page" }
, { id: "doe2001", locator: "5", label: "page", prefix: "see also", suffix: "etc" } ]
, { id: "doe2001", locator: "5", label: "page", prefix: "see also ", suffix: " etc" } ]
- [{ id: "doe2001", locator: "5", label: "page" }]

@@ -196,9 +196,11 @@ expect:

abbreviations:
- jurisdiction: default
hereinafter:
- hereinafter:
doe2001: Misc
- jurisdiction: us
container-title:
American Something Journal: ASJ
Coolest Tribunal Of The Land: CTL
```
Without a `jurisdiction` specified, it is `default`.
See this command's output for a list of allowed categories.

@@ -221,3 +223,3 @@

<layout prefix="(" suffix=")" delimiter="; " ...>
<text value="lots of messy code"
<text value="lots of messy code" />
<choose>

@@ -367,7 +369,16 @@ ...

Each non-stub test object has a `result` key added of the same shape as
`expect`, and a `type` indicating what kind of test it was (`doc` for
documentation only (i.e. it had a 'meta' key but no actual test), `stub` if
there was no expected output defined, `single` and `sequence`).
Each test object has these keys added:
* `type` indicating what kind of test it was:
* `single`
* `sequence`
* `doc` for documentation only (i.e. it had a doc key but no actual test)
* `stub` otherwise
* `result` key of the same shape as `expect` (only if the test had an `expect`)
#### Test Metadata
Two keys, `doc` and `meta`, are recognised as metadata on both `describe` units
and test cases. They may have any content, and will be included in the output.
### Collecting test results via JavaScript

@@ -374,0 +385,0 @@

@@ -72,17 +72,26 @@ const { readTestUnits, normalizeItalics } = require('./lib');

unit.tests.forEach(test => {
// TODO: handle skipped tests
if (test.mode === 'skip') {
// do nothing
} else if (test.mode === 'doc') {
_tests.push({ ...test, type: 'doc', passed: false })
} else if (!test.expect) {
_tests.push({ ...test, type: 'stub', passed: false })
} else if (test.single && test.expect) {
let res = engine.processTestCase(test);
test = stripItems(test);
_tests.push({ ...test, type: 'single', result: res, passed: normalizeItalics(res) === normalizeItalics(test.expect) });
_tests.push({
...test,
type: 'single',
result: res,
passed: normalizeItalics(res) === normalizeItalics(test.expect)
});
} else if (test.sequence && test.expect) {
let res = engine.processTestCase(test);
test = stripItems(test);
_tests.push({ ...test, type: 'sequence', result: res, passed: sequenceMatches(test.expect, res) });
_tests.push({
...test,
type: 'sequence',
result: res,
passed: sequenceMatches(test.expect, res)
});
} else if (test.doc) {
_tests.push({ ...test, type: 'doc', passed: false })
} else {
_tests.push({ ...test, type: 'stub', passed: false })
}

@@ -89,0 +98,0 @@ })

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc