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.7 to 0.1.0

4

lib/unexpected.js

@@ -358,3 +358,3 @@ // Copyright (c) 2013 Sune Simonsen <sune@we-knowhow.dk>

expect.addAssertion('<=', 'to be (<=|less than or equals to)', function (value) {
expect.addAssertion('<=', 'to be (<=|less than or equal to)', function (value) {
this.assert(this.obj <= value);

@@ -367,3 +367,3 @@ });

expect.addAssertion('>=', 'to be (>=|greater than or equals to)', function (value) {
expect.addAssertion('>=', 'to be (>=|greater than or equal to)', function (value) {
this.assert(this.obj >= value);

@@ -370,0 +370,0 @@ });

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

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

@@ -116,6 +116,19 @@ # Unexpected

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', Array);
expect([], 'to be an', 'object');
expect([], 'to be an', Array);
expect([], 'to be an object');
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');
```

@@ -213,6 +226,6 @@

**greater than or equals to**: asserts `>`
**greater than or equal to**: asserts `>`
```js
expect(3, 'to be greater than or equals to', 2);
expect(3, 'to be greater than or equal to', 2);
expect(3, 'to be >=', 3);

@@ -231,6 +244,6 @@ expect(3, '>=', 3);

**less than or equals to**: asserts `>`
**less than or equal to**: asserts `>`
```js
expect(0, 'to be less than or equals to', 4);
expect(0, 'to be less than or equal to', 4);
expect(4, 'to be <=', 4);

@@ -237,0 +250,0 @@ expect(3, '<=', 4);

@@ -362,5 +362,5 @@ /*global describe, it, expect*/

describe('less than or equals assertion', function () {
describe('less than or equal assertion', function () {
it('asserts <=', function () {
expect(0, 'to be less than or equals to', 4);
expect(0, 'to be less than or equal to', 4);
expect(4, 'to be <=', 4);

@@ -372,4 +372,4 @@ expect(3, '<=', 4);

expect(function () {
expect(0, 'to be less than or equals to', -1);
}, 'to throw exception', "expected 0 to be less than or equals to -1");
expect(0, 'to be less than or equal to', -1);
}, 'to throw exception', "expected 0 to be less than or equal to -1");
});

@@ -393,5 +393,5 @@ });

describe('greater than or equals assertion', function () {
describe('greater than or equal assertion', function () {
it('assert >=', function () {
expect(3, 'to be greater than or equals to', 2);
expect(3, 'to be greater than or equal to', 2);
expect(3, 'to be >=', 3);

@@ -403,4 +403,4 @@ expect(3, '>=', 3);

expect(function () {
expect(-1, 'to be greater than or equals to', 0);
}, 'to throw exception', "expected -1 to be greater than or equals to 0");
expect(-1, 'to be greater than or equal to', 0);
}, 'to throw exception', "expected -1 to be greater than or equal to 0");
});

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