fix(slpdb): Removing slpdb from default integration tests

This commit is contained in:
Chris Troutner
2022-01-17 15:07:06 -08:00
parent f09f96d365
commit d50f4a0d50
3 changed files with 1163 additions and 1153 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
"test:integration:nft": "export RESTURL=https://bchn.fullstack.cash/v5/ && export IS_USING_FREE_TIER=true && mocha --timeout 30000 -g '#nft1' test/integration/chains/bchn/slp.js",
"test:integration:abc": "export RESTURL=https://abc.fullstack.cash/v5/ && export IS_USING_FREE_TIER=true && mocha --timeout 30000 test/integration/ && mocha --timeout 30000 test/integration/chains/abc/",
"test:integration:bchn": "export RESTURL=https://bchn.fullstack.cash/v5/ && export IS_USING_FREE_TIER=true && mocha --timeout 30000 test/integration/ && mocha --timeout 30000 test/integration/chains/bchn/",
"test:integration:testnet": "IS_USING_FREE_TIER=true mocha --timeout 30000 test/integration/chains/testnet/",
"test:integration:bchn:slpdb": "export TESTSLP=1 && export RESTURL=https://bchn.fullstack.cash/v5/ && export IS_USING_FREE_TIER=true && mocha --timeout 30000 test/integration/ && mocha --timeout 30000 test/integration/chains/bchn/",
"test:integration:local:abc": "export RESTURL=http://localhost:3000/v5/ && mocha --timeout 30000 test/integration && mocha --timeout 30000 test/integration/chains/abc/",
"test:integration:local:bchn": "export RESTURL=http://localhost:3000/v5/ && mocha --timeout 30000 test/integration/ && mocha --timeout 30000 test/integration/chains/bchn/",
"test:integration:local:testnet": "RESTURL=http://localhost:4000/v5/ mocha --timeout 30000 test/integration/chains/testnet",
+6 -2
View File
@@ -30,6 +30,7 @@ describe('#SLP', () => {
bchjs = new BCHJS()
})
if (process.env.TESTSLP) {
describe('#util', () => {
describe('#decodeOpReturn', () => {
it('should decode a NFT Child transaction', async () => {
@@ -267,7 +268,8 @@ describe('#SLP', () => {
describe('#nft1', () => {
describe('#listNFTGroupChildren', () => {
it('should return array of children GENESIS transactions IDs', async () => {
const groupId = '68cd33ecd909068fbea318ae5ff1d6207cf754e53b191327d6d73b6916424c0a'
const groupId =
'68cd33ecd909068fbea318ae5ff1d6207cf754e53b191327d6d73b6916424c0a'
const result = await bchjs.SLP.NFT1.listNFTGroupChildren(groupId)
// console.log(`result: ${JSON.stringify(result, null, 2)}`)
assert.property(result, 'nftChildren')
@@ -276,7 +278,8 @@ describe('#SLP', () => {
})
describe('#parentNFTGroup', () => {
it('should return parent NFT group information', async () => {
const tokenId = '45a30085691d6ea586e3ec2aa9122e9b0e0d6c3c1fd357decccc15d8efde48a9'
const tokenId =
'45a30085691d6ea586e3ec2aa9122e9b0e0d6c3c1fd357decccc15d8efde48a9'
const result = await bchjs.SLP.NFT1.parentNFTGroup(tokenId)
// console.log(`result: ${JSON.stringify(result, null, 2)}`)
assert.property(result, 'nftGroup')
@@ -289,6 +292,7 @@ describe('#SLP', () => {
})
})
})
}
})
// Promise-based sleep function
+9 -3
View File
@@ -30,6 +30,7 @@ describe('#SLP', () => {
})
describe('#util', () => {
if (process.env.TESTSLP) {
describe('#list', () => {
it('should get information on the Spice token', async () => {
const tokenId =
@@ -143,7 +144,12 @@ describe('#SLP', () => {
const result = await bchjs.SLP.Utils.decodeOpReturn(txid)
// console.log(`result: ${JSON.stringify(result, null, 2)}`)
assert.hasAllKeys(result, ['tokenType', 'txType', 'tokenId', 'amounts'])
assert.hasAllKeys(result, [
'tokenType',
'txType',
'tokenId',
'amounts'
])
assert.equal(
result.tokenId,
'497291b8a1dfe69c8daea50677a3d31a5ef0e9484d8bebb610dac64bbc202fb7'
@@ -961,8 +967,6 @@ describe('#SLP', () => {
assert.equal(result, false)
})
})
})
describe('#tokentype1', () => {
describe('#getHexOpReturn', () => {
it('should return OP_RETURN object ', async () => {
@@ -990,6 +994,8 @@ describe('#SLP', () => {
})
})
})
}
})
})
// Promise-based sleep function