jesseclark / factory-girl-mongoose

Mongoose Adapter for the factory-girl Node library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected token .

molinto opened this issue · comments

npm install factory-girl factory-girl-mongoose

var FactoryGirl = require('factory-girl'),
    Factory = new FactoryGirl.Factory(),
    MongooseAdapter = require('factory-girl-mongoose').MongooseAdapter,
    Factory.setAdapter(MongooseAdapter);

Error:

/home/sharry/Development/Projects/website/factorygirl.js:6
    Factory.setAdapter(MongooseAdapter);
           ^
SyntaxError: Unexpected token .
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3
25 Feb 09:20:21 - [nodemon] app crashed - waiting for file changes before starting...
``