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

chai-changes

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-changes - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

3

chai-changes.js

@@ -40,3 +40,3 @@ // Generated by CoffeeScript 1.3.3

result = val();
isPromise = (result != null ? result.then : void 0) != null;
isPromise = typeof result.then === 'function';
if (((typeof DS !== "undefined" && DS !== null ? DS.Model : void 0) != null) && result instanceof DS.Model) {

@@ -67,2 +67,3 @@ isPromise = false;

flag(this, 'object', newPromise);
this.then = newPromise.then;
} else {

@@ -69,0 +70,0 @@ for (_j = 0, _len1 = definedActions.length; _j < _len1; _j++) {

@@ -6,3 +6,3 @@ {

"keywords": [ "test", "assertion", "assert", "testing", "changes", "promises" ],
"version": "1.0.3",
"version": "1.1.0",
"repository": {

@@ -9,0 +9,0 @@ "type": "git",

@@ -31,6 +31,6 @@ // Generated by CoffeeScript 1.3.3

it('checks conditions after promise resolved', function(done) {
var def, result;
var def, p, result;
result = 1;
def = window.when.defer();
expect(function() {
p = expect(function() {
return result;

@@ -42,2 +42,3 @@ }).to.change.when((function() {

});
expect(typeof p.then === 'function').to.be["true"];
result += 1;

@@ -47,10 +48,12 @@ return def.resolve();

it('checks conditions after promise is rejected', function(done) {
var def, result;
var def, p, result;
result = 1;
def = window.when.defer();
expect(function() {
p = expect(function() {
return result;
}).to.change.when(function() {
return def.promise;
}).and.notify(done);
});
expect(typeof p.then === 'function').to.be["true"];
p.notify(done);
result += 1;

@@ -60,10 +63,12 @@ return def.reject();

return it('returns a promise about the expectations', function(done) {
var def, result;
var def, p, result;
result = 1;
def = window.when.defer();
expect(function() {
p = expect(function() {
return result;
}).to.change.when(function() {
return def.promise;
}).be.broken["with"]('expected `result;` to change, but it stayed 1').notify(done);
}).be.broken["with"]('expected `result;` to change, but it stayed 1');
expect(typeof p.then === 'function').to.be["true"];
p.notify(done);
return def.resolve();

@@ -70,0 +75,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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