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

unexpected

Package Overview
Dependencies
Maintainers
1
Versions
330
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unexpected - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

6

lib/unexpected.js

@@ -264,2 +264,8 @@ // Copyright (c) 2013 Sune Simonsen <sune@we-knowhow.dk>

// Alias for common 'to [not] be (a|an)' assertions
expect.addAssertion('to [not] be (a|an) (boolean|number|string|function|object|array)', function () {
var matches = /(.*) (\w+)/.exec(this.testDescription);
expect(this.obj, matches[1], matches[2]);
});
expect.addAssertion('to [not] match', function (regexp) {

@@ -266,0 +272,0 @@ this.assert(regexp.exec(this.obj));

2

package.json
{
"name": "unexpected",
"version": "0.0.6",
"version": "0.0.7",
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>",

@@ -5,0 +5,0 @@ "keywords": [

# Unexpected
**Warning: this is not totally ready for prime time yet**
Minimalistic BDD assertion toolkit based on

@@ -73,2 +71,6 @@ [expect.js](https://github.com/LearnBoost/expect.js)

### to be ok
asserts that the value is _truthy_
**ok** / **truthy** / **falsy**: asserts that the value is _truthy_ or not

@@ -75,0 +77,0 @@

@@ -63,7 +63,14 @@ /*global describe, it, expect*/

expect(5, 'to be a', 'number');
expect(5, 'to be a number');
expect([], 'to be an', 'array');
expect([], 'to be an array');
expect([], 'to be an', 'object');
expect([], 'to be an object');
expect([], 'to be an', Array);
expect(null, 'to not be an', 'object');
expect(null, 'to not be an object');
expect(true, 'to be a', 'boolean');
expect(true, 'to be a boolean');
expect("".substring, 'to be a', 'function');
expect("".substring, 'to be a function');
});

@@ -70,0 +77,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