-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa23e15
commit 8acd5b2
Showing
3 changed files
with
92 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
import { parseProto } from '../../src/index.js'; | ||
import { test } from 'uvu'; | ||
import * as assert from 'uvu/assert'; | ||
|
||
|
||
const source = ` | ||
message UpdateHostBankAccWalletInfoResp { | ||
// 0:成功 非0:错误码 | ||
//50010 bank account already exist | ||
//50011: bank account number already exist but the bank name or bank account name mismatch | ||
//50012 bank account mismatch the one on bank side | ||
optional ErrorCode errorCode = 1; | ||
optional string errorMsg = 2; | ||
optional UpdateHostBankAccWalletInfoRespData data = 3; | ||
} | ||
`; | ||
|
||
test('Comment of Field type should be converted', () => { | ||
const ts = parseProto(source); | ||
|
||
assert.match(ts, '//50010 bank account already exist'); | ||
assert.match(ts, '//50011: bank account number already exist'); | ||
assert.match(ts, '//50012 bank account mismatch the one on'); | ||
}); | ||
|
||
|
||
test.run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters