input parameters undefined when using node

I jsut started developing in javascript and still have some problems to separate the concepts (js, node, buster, ...) so please forgive me if the question is not exactly in the right scope.

I am trying to develop a js application, and want to have a test driven approach.

Here is a simple object that I define in my js folder:

var Friend = (function(name, email){
    console.log(name)
    if (typeof(name) != "string") throw "Expected a string for name"

    this.name = name;
    this.email = email;
}());
module.exports = Friend(name, email);

And in my test folder, I want to test it using friend_test.js

var buster = require("buster");
var Friend = require('/../js/friend');

buster.testCase("A normal Friend", {
    "should have a name and a mail": function(){
    var my_friend = new Friend("Georges", "georges@hotmail.com");
    assert.equals(my_friend.name, "Georges");
    assert.equals(my_friend.email, "georges@hotmail.com");
    }
});

My concern here is that if I run my tests, name and emails are not known within friend, just like if the input parameters were not passed :

$ node test/friend-test.js
undefined
undefined

friend.js:4
    if (typeof(name) != "string") throw "Expected a string for name"
                                  ^
Expected a string for name

What do I do wrong ?

Thx,

Hum, it seems like I was trying to make things more complex than needed.

By defining friend as a function :

var Friend = function(name, email){
    if (typeof(name) != "string") throw "Expected a string for name"

    //TODO: Check email is valid here

    this.name = name;
    this.email = email;
};

module.exports = Friend;

the problem seems to be solved

$ node test/friend-test.js A normal Friend: . 1 test case, 1 test, 2 assertions, 0 failures, 0 errors, 0 timeouts Finished in 0.003s