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

fnflow

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fnflow - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

2

lib/task.js

@@ -142,3 +142,3 @@ var util = require('util');

} catch(e){
throw new FlowTaskError(self.name, "Error during execution of function.", e);
return callback(new FlowTaskError(self.name, "Error during execution of function.", e));
}

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

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

"author": "David Fenster <david@dfenster.com>",
"version": "0.4.0",
"version": "0.4.1",
"repository": {

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

@@ -549,21 +549,31 @@ var us = require('underscore');

module.exports["error in task function"] = function(test){
try {
new Flow({
getBook: new Task(Book.getById, 'bookId'),
getAuthor: new Task(Author.getById),
new Flow({
getBook: new Task(Book.getById, 'bookId'),
getAuthor: new Task(Author.getById),
}).execute({
bookId: 1
}, function(err, results){
test.fail(null, null, "no error received");
test.done();
});
} catch(e) {
test.ok(e, 'got an error');
test.equals(e.name, "FlowTaskError", "got FlowTaskError");
test.equals(e.message, "Flow error in 'getAuthor': Error during execution of function.", "error message match")
test.ok(/TypeError: undefined is not a function/.test(e.stack))
bookId: 1
}, function(err, results){
test.ok(err, 'got an error');
test.equals(err.name, "FlowTaskError", "got FlowTaskError");
test.equals(err.message, "Flow error in 'getAuthor': Error during execution of function.", "error message match")
test.ok(/TypeError: undefined is not a function/.test(err.stack))
test.done();
}
});
}
module.exports["error in synchronous task function"] = function(test){
new Flow({
getBook: new Task(Book.getById, 'bookId'),
getAuthor: new Fn(Author.getById),
}).execute({
bookId: 1
}, function(err, results){
test.ok(err, 'got an error');
test.equals(err.name, "FlowTaskError", "got FlowTaskError");
test.equals(err.message, "Flow error in 'getAuthor': Error during execution of function.", "error message match")
test.ok(/TypeError: undefined is not a function/.test(err.stack))
test.done();
});
}
module.exports["subFlow execution"] = function(test){

@@ -570,0 +580,0 @@ new Flow({

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