How to solve the “callback not fired” with vows and Node.js

I am trying to start with Vows and Vows-BDD . Unfortunately, callbacks have disabled me.

In the simplest example below, how to fix this error?

** Inside the first context ** Creating Person with name Nick ✗ Errored » callback not fired in Create a Person via JavaScript: When a person has a name, in Creating a Person in undefined✗ Errored » 1 errored 1 dropped 
 vows_bdd = require "vows-bdd" assert = require "assert" class Person constructor: (@name) -> console.log "** Creating Person with name #{@name}" greeting: -> "Hello, #{@name}" vows_bdd .Feature("Creating a Person") .scenario("Create a Person via JavaScript") .when "a person has a name", -> console.log "** Inside the first context" new Person "Nick" .then "the person can be greeted", (person) -> console.log "person is a #{typeof person} = [#{person}]" assert.equal person.greeting(), "Hello, Nick" .complete() .finish(module) 
+4
source share
1 answer

I know this post is outdated, but since this is the first result when someone searches for this error, I am posting my answer.

I found this post helpful when it comes to error. http://birkett.no/blog/2013/05/01/vows-errored-callback-not-fired/ .

In my code error, an error occurred in one of the topics. Vows do not print the actual error, making it difficult to understand the exact problem.

+2
source

Source: https://habr.com/ru/post/1411014/


All Articles