Skip to content

Commit c10fca3

Browse files
committed
chore: update a test
1 parent 400061b commit c10fca3

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

__snapshots__/commit-message-install-spec.js

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,6 @@ exports['commit-message-install getJsonBlock returns json with branch 1'] = {
4646
"branch": "test-branch"
4747
}
4848

49-
exports['commit-message-install getJsonFromGit extracts formed json correctly 1'] = {
50-
"platform": "linux",
51-
"env": {},
52-
"packages": "debug chalk",
53-
"status": {
54-
"owner": "foo",
55-
"repo": "bar",
56-
"sha": "2d8687c143165218c6b52a76018b76cf99137e48"
57-
}
58-
}
59-
6049
exports['commit-message-install getJsonFromGit extracts the json from git message 1'] = {
6150
"platform": "win32",
6251
"branch": "some-branch"
@@ -117,3 +106,25 @@ exports['commit-message-install isPlatformAllowed compares platforms isPlatformA
117106
}
118107
]
119108
}
109+
110+
exports['formed json object'] = {
111+
"platform": "linux",
112+
"env": {},
113+
"packages": "debug chalk",
114+
"status": {
115+
"owner": "foo",
116+
"repo": "bar",
117+
"sha": "2d8687c143165218c6b52a76018b76cf99137e48"
118+
}
119+
}
120+
121+
exports['parsed back message'] = {
122+
"platform": "linux",
123+
"env": {},
124+
"packages": "debug chalk",
125+
"status": {
126+
"owner": "foo",
127+
"repo": "bar",
128+
"sha": "2d8687c143165218c6b52a76018b76cf99137e48"
129+
}
130+
}

src/commit-message-install-spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,14 @@ describe('commit-message-install', () => {
7777
status
7878
}
7979
const info = getInstallJson(options)
80+
snapshot('formed json object', info)
81+
8082
const json = toMarkdownJsonBlock(info)
8183
const message = `some text\n\n` + json
8284

8385
stubSpawnShellOnce(getMessageGitCommand, 0, message, '')
8486
return getJsonFromGit().then(json => {
85-
snapshot(json)
87+
snapshot('parsed back message', json)
8688
})
8789
})
8890

0 commit comments

Comments
 (0)