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

unexpected

Package Overview
Dependencies
Maintainers
2
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 1.0.4 to 1.0.5

5

lib/unexpected.js

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

Unexpected.prototype.toString = function () {
return getKeys(this.assertions).sort().join('\n');
};
Unexpected.prototype.inspect = inspect;

@@ -147,2 +151,3 @@ Unexpected.prototype.eql = eql;

expect.clone = bind(unexpected.clone, unexpected);
expect.toString = bind(unexpected.toString, unexpected);
expect.assertions = unexpected.assertions;

@@ -149,0 +154,0 @@ return expect;

2

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

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

@@ -94,7 +94,13 @@ # Unexpected

expect(1, 'to be', 1);
expect(undefined, 'to be undefined');
expect(null, 'to be null');
expect(1, 'not to be', true);
expect('1', 'not to be', 1);
expect(null, 'not to be', undefined);
expect(null, 'to be null');
expect(0, 'not to be null');
expect(undefined, 'not to be null');
expect(true, 'to be true');
expect(false, 'not to be true');
expect(false, 'to be false');
expect(true, 'not to be false');
expect(undefined, 'to be undefined');
```

@@ -293,4 +299,10 @@

## Using with a test framework
## Print all registered assertions to the console
```js
console.log(expect.toString());
```
## Using Unexpected with a test framework
For example, if you create a test suite with

@@ -297,0 +309,0 @@ [mocha](http://github.com/visionmedia/mocha).

@@ -60,3 +60,5 @@ /*global describe, it, expect*/

expect(true, 'to be true');
expect(false, 'not to be true');
expect(false, 'to be false');
expect(true, 'not to be false');
expect(undefined, 'to be undefined');

@@ -63,0 +65,0 @@ if (typeof Buffer !== 'undefined') {

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