Current stage:
I want to check that the bundle.js works correctly. I set up a test to register an object by using Mocha.
Problem:
When I run the app by "node app.js" in my local terminal, the test case data is registered correctly in dynamoDB, meaning "Mocha test case is working well". But it shows up an error with "TypeError: expect is not a function", meaning the the expect function is not exist to catch HTTP response (HTTP response which 200 is received, but not recognisable)
When I run the GitHub action workflow(Download bundle.js, run it and test it), it shows an error "AxiosError: Request failed with status code 404". Just before this test, I have another test using curl to grep a component of HTML, and it works. Therefore, the server is properly working.
The problem is the configuration to bundle the web app or some misconfiguration in Mocha test settings.
Current stage: I want to check that the bundle.js works correctly. I set up a test to register an object by using Mocha.
Problem: When I run the app by "node app.js" in my local terminal, the test case data is registered correctly in dynamoDB, meaning "Mocha test case is working well". But it shows up an error with "TypeError: expect is not a function", meaning the the expect function is not exist to catch HTTP response (HTTP response which 200 is received, but not recognisable)
When I run the GitHub action workflow(Download bundle.js, run it and test it), it shows an error "AxiosError: Request failed with status code 404". Just before this test, I have another test using curl to grep a component of HTML, and it works. Therefore, the server is properly working.
The problem is the configuration to bundle the web app or some misconfiguration in Mocha test settings.