Skip to content

Commit

Permalink
Additional testing for Symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Jan 20, 2024
1 parent 8711106 commit 3a04700
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,14 @@ suite('chain', function () {
assert.equal(symbol.precision, '10')
assert.equal(Asset.Symbol.from(symbol.value).toString(), symbol.toString())

assert.throws(() => Asset.Symbol.from('0,0'))

const nft_symbol = Asset.Symbol.from(Asset.Symbol.from('0,'))
assert.equal(nft_symbol.name, '')
assert.equal(nft_symbol.precision, '0')
assert.equal(Asset.Symbol.from(nft_symbol.value).toString(), nft_symbol.toString())
assert.equal(nft_symbol.precision, 0)
assert.equal(nft_symbol.value, 0)
assert.isTrue(nft_symbol.code.value.equals(0))
assert.equal(Asset.Symbol.from(nft_symbol).toString(), nft_symbol.toString())

// test null asset
asset = Asset.from('0 ')
Expand Down

0 comments on commit 3a04700

Please sign in to comment.