in case they were pounding their head against this for an hour like I
was: https://github.com/cloudhead/vows/issues/24
On Saturday, November 27, 2010 5:15:39 PM UTC-5, Georg Tavonius wrote:
Thanks, didn't saw that. That's true: You really get blind to the solution
if you stare too long at the problem.
Georg
On Sat, Nov 27, 2010 at 5:11 AM, Charlie Robbins <
charlie.robbins@gmail.com> wrote:
--Thanks, didn't saw that. That's true: You really get blind to the solution
if you stare too long at the problem.
Georg
On Sat, Nov 27, 2010 at 5:11 AM, Charlie Robbins <
charlie.robbins@gmail.com> wrote:
Georg,
Vows has follows the node convention that the first argument to your
callback would be an error, so when you execute:
callback(a)
vows interprets that object as an error.
Try
callback(null, a)
and everything should work just fine
--Charlie
On Tue, Nov 23, 2010 at 4:43 PM, Georg Tavonius <
g.tavonius@googlemail.com> wrote:
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To post to this group, send email to nodejs@googlegroups.com.
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en.
Vows has follows the node convention that the first argument to your
callback would be an error, so when you execute:
callback(a)
vows interprets that object as an error.
Try
callback(null, a)
and everything should work just fine
--Charlie
On Tue, Nov 23, 2010 at 4:43 PM, Georg Tavonius <
g.tavonius@googlemail.com> wrote:
Hi guys!
I'm currently writing some unit tests with the vows testing framework, I
really came to like. But the problem I try to solve for some hours is that
I don't get it to work really well with mongoose. The problem I'm facing is
that everytime I try to retrieve some value from the database I get the
following error in vows:
some mongoose test
? that blows up
which is no help at all. Did someone have the same problems and maybe a
solution? Maybe I'm blind to the solution right now.
The following code can reproduce this error:
var vows = require('vows'),
assert = require('assert'),
Dummy = db.model('./Dummy');
module.exports = vows.describe('Dummy model')
.addBatch({
'some mongoose test': {
topic: function() {
var s = Dummy.create({
name: 'The Mighty'
});
callback = this.callback;
s.save(function() {
Study.find().one(function(a) {
console.log("this is executed"); // that will be printed
callback(a);
});
});
},
'that blows up': function(s) {
console.log("and this is never executed"); // that won't
}
}
}).run();
given a mongoose model with at least a name as property.
Hopefully, someone can shed some light upon this. Thanks, in advance.
Cheers,
Georg
--exhausting problem hunt
--
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com.
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en.
--I'm currently writing some unit tests with the vows testing framework, I
really came to like. But the problem I try to solve for some hours is that
I don't get it to work really well with mongoose. The problem I'm facing is
that everytime I try to retrieve some value from the database I get the
following error in vows:
some mongoose test
? that blows up
An unexpected error was caught: [object Object]
solution? Maybe I'm blind to the solution right now.
The following code can reproduce this error:
var vows = require('vows'),
assert = require('assert'),
Dummy = db.model('./Dummy');
module.exports = vows.describe('Dummy model')
.addBatch({
'some mongoose test': {
topic: function() {
var s = Dummy.create({
name: 'The Mighty'
});
callback = this.callback;
s.save(function() {
Study.find().one(function(a) {
console.log("this is executed"); // that will be printed
callback(a);
});
});
},
'that blows up': function(s) {
console.log("and this is never executed"); // that won't
}
}
}).run();
given a mongoose model with at least a name as property.
Hopefully, someone can shed some light upon this. Thanks, in advance.
Cheers,
Georg
--exhausting problem hunt
--
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com.
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en.
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To post to this group, send email to nodejs@googlegroups.com.
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en.
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en