Arquisoft / faq

Frequently asked questions - Software architecture course
MIT License
4 stars 0 forks source link

Problem running e2e tests in Windows using the lomap templates #41

Closed labra closed 10 months ago

labra commented 1 year ago

We noticed that the way the e2e tests were configured was working fine in continuous integration and in Linux, but not in Windows.

The problem was this line in webapp/package.json:

"test:e2e": "start-server-and-test 'npm --prefix ../restapi start' http://localhost:5000/api/users/list prod 3000 'cd e2e && jest'",

which is using ' cd e2e && jest'. When it is run in Windows it says:

"jest'" not recognized as as internal or external command

The problem is that it is trying to run jest' instead of jest.

Solution

A solution is to replace the ' by \" as:

"test:e2e": "start-server-and-test 'npm --prefix ../restapi start' http://localhost:5000/api/users/list prod 3000 \"cd e2e && jest\"",  

The current lomap_0 repo contains the updated version which works.