Cant pass test -> Advanced Node and Express - Clean Up Your Project with Modules

Tell us what’s happening:

  • I cant pass the Test for this Curriculum. And i doesn’t know the reason.

Your code so far

Your browser information:

  • User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0.

Challenge:

  • Advanced Node and Express - Clean Up Your Project with Modules

Link to the challenge:

1 Like

Hi @dkleber89,
You can find the tests that are being run for this challenge in this markdown file. The tests are looking at your server.js file and trying to match two regular expressions:

assert.match(data, /require\s*\(('|")\.\/routes(\.js)?\1\)/gi, 'You should have required your new files'); 
assert.match(data, /mongo.connect[^]*routes/gi, 'Your new modules should be called after your connection to the database');

The second assertion is looking for mongo.connect, and you have called your client called client instead of mongo. I think that might be the problem.

2 Likes

Yes that was the Problem … Thanks, dkleber89

3 Likes