Expresso cumulative project: CREATE TABLE Employee test fail

Hey, I’m just starting with this project and I don’t know why when I run the tests on it, it fails in the part of creating an employee table and its columns.
I leave my repository here: https://github.com/juanpedropuig/capstone-project-2-expresso-start
Cheers.

Hello, your repository seems to be private or it’s a bad link, so I can’t look into the specifics.

However, one thing to make sure of is that you ran your migration.js code with node so the tables get created.

1 Like

Yes, thanks for that. I think I made it public now, try checking it out!

Your database creation code is passing the tests fine on my system.

I deleted my existing database, ran npm test to confirm the tests were failing, dropped in your CREATE TABLE code into my migration.js file, ran node migration.js, then re-ran the tests.

1 Like

Ok, thanks, so it must be my computer then? Don’t know what’s going on though.

Did you get any other hints in the messages? Have you had trouble with other projects involving the databases before? For example, in the path I’m on, the X-Press Publishing project came before this and also involved sqlite databases. Is there a chance you forgot to run npm install? Only asking that since it’s so early in the project.

Also, have you tried opening the database that gets created in DB Browser like they recommend? It’s a free tool available here: https://sqlitebrowser.org/

1 Like

Yes, I did all that already, but I realized I didn’t deleted my existing database and re-ran migration.js as you said earlier. That solve the issue, so thank you for the help!

2 Likes