New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

thunk-test

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thunk-test - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

package.json
{
"name": "thunk-test",
"version": "0.3.0",
"version": "0.3.1",
"description": "Modular testing for JavaScript",

@@ -5,0 +5,0 @@ "author": "Richard Tong",

@@ -23,3 +23,3 @@ # ThunkTest

})()
// pipe: awesome username generator
// -- pipe: awesome username generator
// ✓ pipeline('deimos') -> '_xXxDEIMOSxXx_'

@@ -41,2 +41,12 @@ // ✓ pipeline('|') -> result => assert.equal(result, '_xXx|xXx_')

`ThunkTest` is a function-first testing library.
### Syntax
```coffeescript
ThunkTest(story string, func function) -> thunkTest ()=>() {
case: (...args, expectedResult)=>this,
throws: (...args, expectedError)=>this,
}
```
# Installation

@@ -43,0 +53,0 @@ with `npm`

@@ -327,2 +327,14 @@ const noop = function () {}

/**
* @name errorInspect
*
* @synopsis
* ```coffeescript [specscript]
* Error = { name: string, message: string }
*
* errorInspect(error Error) -> funcRepresentation string
* ```
*/
const errorInspect = error => `${error.name}('${error.message}')`
/**
* @name errorAssertEqual

@@ -437,3 +449,3 @@ *

return objectAssign(function thunkTest() {
log(name)
log('--', name)
const operationsLength = operations.length,

@@ -457,3 +469,3 @@ promises = []

expected,
tapSync(thunkify1(log, ` ✓ ${funcSignature(func, args)} -> ${funcInspect(expected)}`)),
tapSync(thunkify1(log, ` ✓ ${funcSignature(func, args)} |> ${funcInspect(expected)}`)),
].reduce(funcConcat))

@@ -494,3 +506,3 @@ } else {

thunkify2(assertThrows, thunkifyArgs(func, args), expected),
tapSync(thunkify1(log, ` ✓ ${funcSignature(func, args)} throws ${expected}`)),
tapSync(thunkify1(log, ` ✓ ${funcSignature(func, args)} throws ${errorInspect(expected)}`)),
))

@@ -497,0 +509,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