Skip to content

Commit e4c6458

Browse files
authored
Merge pull request #11 from GannaChernyshova/removed-tc-test
2 parents ba77bb8 + 95c8f33 commit e4c6458

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

.labspace/04-switch-to-dhi.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -93,21 +93,4 @@ and navigate to :tabLink[This link]{href="http://localhost:3005" title="Web app"
9393
Then stop the container:
9494
```bash
9595
docker stop demo-node
96-
```
97-
98-
2. Or we can run the functional test and build an app from the Dockerfile using the Testcontainers library.
99-
100-
[Testcontainers](https://testcontainers.com/cloud/) allows you to run the containerized application along with any required services, such as databases, effectively reproducing the local environment needed to test the application at the API or end-to-end (E2E) level.
101-
102-
This simple code block from the `test/app.test.js` allows you to start the application under development from the Dockerfile on demand only for the testing phase:
103-
```plaintext no-copy-button
104-
const builtContainer = await GenericContainer.fromDockerfile('.').build();
105-
container = await builtContainer
106-
.withExposedPorts(3000)
107-
.withWaitStrategy(Wait.forLogMessage(/Example app listening on port \d+/))
108-
.start();
109-
```
110-
Let’s run the tests using the npm test command:
111-
```bash
112-
npm install && npm test
11396
```

0 commit comments

Comments
 (0)