Skip to content
This repository was archived by the owner on Mar 13, 2021. It is now read-only.

Commit 53b5792

Browse files
author
Marcelo
committed
WIP: add unit test on pipeline (gitlab)
1 parent 76c347c commit 53b5792

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Build:
2222
paths:
2323
- dist/
2424

25-
Run application:
25+
Run unit tests:
2626
stage: test
2727
image: cypress/base:10
2828
only:
@@ -32,7 +32,7 @@ Run application:
3232
- apt-get install redis-server sqlite3 -y
3333
- service redis-server start
3434
script:
35-
- yarn start-with-e2e
35+
- yarn test-client
3636
# Integration test:
3737
# stage: test
3838
# image:
@@ -41,12 +41,3 @@ Run application:
4141
# - master
4242
# script:
4343
# - yarn e2e-wait
44-
45-
# Unit test:
46-
# stage: test
47-
# image:
48-
# name: node:11
49-
# only:
50-
# - master
51-
# script:
52-
# - yarn test-wait

azure-pipelines.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
trigger:
2-
- master
2+
- master
33

44
pool:
5-
vmImage: 'ubuntu-latest'
5+
vmImage: "ubuntu-latest"
66

77
steps:
8-
- task: NodeTool@0
9-
inputs:
10-
versionSpec: '10.x'
11-
displayName: 'Install dependencies and build app'
8+
- task: NodeTool@0
9+
inputs:
10+
versionSpec: "10.x"
11+
displayName: "Install dependencies and build app"
1212

13-
- script: |
14-
yarn install
15-
yarn build
16-
displayName: 'yarn install and build'
13+
- script: |
14+
yarn install
15+
yarn build
16+
displayName: "yarn install and build"

src/client/modules/home/ui/components/__tests__/index.client.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ describe("<Home /> test case", () => {
99
<Home groupId={{ id: "1" }} />
1010
);
1111

12-
expect(getByTestId("home-wrapper")).toHaveTextContent("Hello world!");
12+
expect(getByTestId("home-wrapper")).toBeInTheDocument();
13+
expect(getByTestId("home")).toBeInTheDocument();
1314
});
1415
});

0 commit comments

Comments
 (0)