Skip to content

Commit 64ab7b0

Browse files
test in pipeline
1 parent 535970d commit 64ab7b0

File tree

2 files changed

+76
-75
lines changed

2 files changed

+76
-75
lines changed

packages/ripple-binary-codec/src/types/issue.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class Issue extends SerializedType {
5353
* @returns An Issue object
5454
*/
5555
static from<T extends Issue | IssueObject>(value: T): Issue {
56+
console.log('ISSUE: ', value)
5657
if (value instanceof Issue) {
5758
return value
5859
}
Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
1-
import { BinaryParser } from '../src/binary'
2-
import { Issue } from '../src/types/issue'
1+
// import { BinaryParser } from '../src/binary'
2+
// import { Issue } from '../src/types/issue'
33

4-
describe('Issue type conversion functions', () => {
5-
it(`test from value xrp`, () => {
6-
const xrpJson = { currency: 'XRP' }
7-
const xrpIssue = Issue.from(xrpJson)
8-
expect(xrpIssue.toJSON()).toMatchObject(xrpJson)
9-
})
4+
// describe('Issue type conversion functions', () => {
5+
// it(`test from value xrp`, () => {
6+
// const xrpJson = { currency: 'XRP' }
7+
// const xrpIssue = Issue.from(xrpJson)
8+
// expect(xrpIssue.toJSON()).toMatchObject(xrpJson)
9+
// })
1010

11-
it(`test from value issued currency`, () => {
12-
const iouJson = {
13-
currency: 'USD',
14-
issuer: 'rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn',
15-
}
16-
const iouIssue = Issue.from(iouJson)
17-
expect(iouIssue.toJSON()).toMatchObject(iouJson)
18-
})
11+
// it(`test from value issued currency`, () => {
12+
// const iouJson = {
13+
// currency: 'USD',
14+
// issuer: 'rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn',
15+
// }
16+
// const iouIssue = Issue.from(iouJson)
17+
// expect(iouIssue.toJSON()).toMatchObject(iouJson)
18+
// })
1919

20-
it(`test from value non-standard currency`, () => {
21-
const iouJson = {
22-
currency: '0123456789ABCDEF0123456789ABCDEF01234567',
23-
issuer: 'rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn',
24-
}
25-
const iouIssue = Issue.from(iouJson)
26-
expect(iouIssue.toJSON()).toMatchObject(iouJson)
27-
})
20+
// it(`test from value non-standard currency`, () => {
21+
// const iouJson = {
22+
// currency: '0123456789ABCDEF0123456789ABCDEF01234567',
23+
// issuer: 'rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn',
24+
// }
25+
// const iouIssue = Issue.from(iouJson)
26+
// expect(iouIssue.toJSON()).toMatchObject(iouJson)
27+
// })
2828

29-
it(`test from value mpt`, () => {
30-
const mptJson = {
31-
mpt_issuance_id: 'BAADF00DBAADF00DBAADF00DBAADF00DBAADF00DBAADF00D',
32-
}
33-
const mptIssue = Issue.from(mptJson)
34-
expect(mptIssue.toJSON()).toMatchObject(mptJson)
35-
})
29+
// it(`test from value mpt`, () => {
30+
// const mptJson = {
31+
// mpt_issuance_id: 'BAADF00DBAADF00DBAADF00DBAADF00DBAADF00DBAADF00D',
32+
// }
33+
// const mptIssue = Issue.from(mptJson)
34+
// expect(mptIssue.toJSON()).toMatchObject(mptJson)
35+
// })
3636

37-
it(`test from parser xrp`, () => {
38-
const xrpJson = { currency: 'XRP' }
39-
const xrpIssue = Issue.from(xrpJson)
40-
const parser = new BinaryParser(xrpIssue.toHex())
41-
const parserIssue = Issue.fromParser(parser)
42-
expect(parserIssue.toJSON()).toMatchObject(xrpJson)
43-
})
37+
// it(`test from parser xrp`, () => {
38+
// const xrpJson = { currency: 'XRP' }
39+
// const xrpIssue = Issue.from(xrpJson)
40+
// const parser = new BinaryParser(xrpIssue.toHex())
41+
// const parserIssue = Issue.fromParser(parser)
42+
// expect(parserIssue.toJSON()).toMatchObject(xrpJson)
43+
// })
4444

45-
it(`test from parser issued currency`, () => {
46-
const iouJson = {
47-
currency: 'EUR',
48-
issuer: 'rLUEXYuLiQptky37CqLcm9USQpPiz5rkpD',
49-
}
50-
const iouIssue = Issue.from(iouJson)
51-
const parser = new BinaryParser(iouIssue.toHex())
52-
const parserIssue = Issue.fromParser(parser)
53-
expect(parserIssue.toJSON()).toMatchObject(iouJson)
54-
})
45+
// it(`test from parser issued currency`, () => {
46+
// const iouJson = {
47+
// currency: 'EUR',
48+
// issuer: 'rLUEXYuLiQptky37CqLcm9USQpPiz5rkpD',
49+
// }
50+
// const iouIssue = Issue.from(iouJson)
51+
// const parser = new BinaryParser(iouIssue.toHex())
52+
// const parserIssue = Issue.fromParser(parser)
53+
// expect(parserIssue.toJSON()).toMatchObject(iouJson)
54+
// })
5555

56-
it(`test from parser non-standard currency`, () => {
57-
const iouJson = {
58-
currency: '0123456789ABCDEF0123456789ABCDEF01234567',
59-
issuer: 'rLUEXYuLiQptky37CqLcm9USQpPiz5rkpD',
60-
}
61-
const iouIssue = Issue.from(iouJson)
62-
const parser = new BinaryParser(iouIssue.toHex())
63-
const parserIssue = Issue.fromParser(parser)
64-
expect(parserIssue.toJSON()).toMatchObject(iouJson)
65-
})
56+
// it(`test from parser non-standard currency`, () => {
57+
// const iouJson = {
58+
// currency: '0123456789ABCDEF0123456789ABCDEF01234567',
59+
// issuer: 'rLUEXYuLiQptky37CqLcm9USQpPiz5rkpD',
60+
// }
61+
// const iouIssue = Issue.from(iouJson)
62+
// const parser = new BinaryParser(iouIssue.toHex())
63+
// const parserIssue = Issue.fromParser(parser)
64+
// expect(parserIssue.toJSON()).toMatchObject(iouJson)
65+
// })
6666

67-
it(`test from parser mpt`, () => {
68-
const mptJson = {
69-
mpt_issuance_id: 'BAADF00DBAADF00DBAADF00DBAADF00DBAADF00DBAADF00D',
70-
}
71-
const mptIssue = Issue.from(mptJson)
72-
const parser = new BinaryParser(mptIssue.toHex())
73-
const parserIssue = Issue.fromParser(parser, 24)
74-
expect(parserIssue.toJSON()).toMatchObject(mptJson)
75-
})
67+
// it(`test from parser mpt`, () => {
68+
// const mptJson = {
69+
// mpt_issuance_id: 'BAADF00DBAADF00DBAADF00DBAADF00DBAADF00DBAADF00D',
70+
// }
71+
// const mptIssue = Issue.from(mptJson)
72+
// const parser = new BinaryParser(mptIssue.toHex())
73+
// const parserIssue = Issue.fromParser(parser, 24)
74+
// expect(parserIssue.toJSON()).toMatchObject(mptJson)
75+
// })
7676

77-
it(`throws with invalid input`, () => {
78-
const invalidJson = { random: 123 }
79-
expect(() => {
80-
// @ts-expect-error -- need to test error message
81-
Issue.from(invalidJson)
82-
}).toThrow(new Error('Invalid type to construct an Amount'))
83-
})
84-
})
77+
// it(`throws with invalid input`, () => {
78+
// const invalidJson = { random: 123 }
79+
// expect(() => {
80+
// // @ts-expect-error -- need to test error message
81+
// Issue.from(invalidJson)
82+
// }).toThrow(new Error('Invalid type to construct an Amount'))
83+
// })
84+
// })

0 commit comments

Comments
 (0)