Skip to content

TypeError: Arguments to path.join must be strings #37

@joaom182

Description

@joaom182

Hello, i have the following error

TypeError: Arguments to path.join must be strings
      at Object.posix.join (path.js:467:13)
      at Context.<anonymous> (test/rank/rankServiceTest.js:19:3)

with the following code

var Q = require('q');
var async = require('async');
var expect = require('expect.js');
var load = require('express-load');
var app = require('../../app.js');
var mongoose = require('mongoose');
var basicMongoDbMock = require('../mockDb/basicMongoDbMock');

describe('Suite 01', function () {

    before(function (done) {
        this.timeout(8000);

        load('config') //  at Context.<anonymous> (test/rank/rankServiceTest.js:19:3)
            .then('enums')
            .then('models/UniqueId.js')
            .then('models')
            .then('modules/rank')
            .into(app, function () {
            });
    });

    beforeEach(function (done) {
        mongoose.connect('mongodb://localhost:27017/squid_test');

        basicMongoDbMock
            .seed(Mission, Participation, User, Image)
            .then(function () {
                done();
            });
    });

    afterEach(function (done) {
        basicMongoDbMock
            .unseed(Mission, Participation, User, Image)
            .then(function () {
                mongoose.disconnect(function () {
                    done();
                });
            });
    });

    it('Should...', function (done) {

    });

});

This is the start line of the exception

        load('config') //  at Context.<anonymous> (test/rank/rankServiceTest.js:19:3)

Have any idea of the cause for the error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions