Skip to content

Commit

Permalink
feat: reenable all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Polybius93 committed Jul 11, 2024
1 parent 228b66b commit 103fa66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
6 changes: 3 additions & 3 deletions tests/unit/proof-of-reserve.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('Proof of Reserve Calculation', () => {
jest.clearAllMocks();
});
describe('verifyVaultDeposit', () => {
xit("should return true when the vault's funding transaction is confirmed, contains an output with the multisig's script, and the output's value matches the vault's valueLocked field", async () => {
it("should return true when the vault's funding transaction is confirmed, contains an output with the multisig's script, and the output's value matches the vault's valueLocked field", async () => {
jest
.spyOn(bitcoinRequestFunctions, 'fetchBitcoinTransaction')
.mockImplementationOnce(async () => TEST_TESTNET_FUNDING_TRANSACTION_1);
Expand All @@ -34,7 +34,7 @@ describe('Proof of Reserve Calculation', () => {
expect(result).toBe(true);
});

xit('should return false if the funding transaction is not found', async () => {
it('should return false if the funding transaction is not found', async () => {
jest
.spyOn(bitcoinRequestFunctions, 'fetchBitcoinTransaction')
.mockImplementationOnce(async () => {
Expand All @@ -52,7 +52,7 @@ describe('Proof of Reserve Calculation', () => {
expect(result).toBe(false);
});

xit("should return false when the vault's funding transaction is not yet confirmed", async () => {
it("should return false when the vault's funding transaction is not yet confirmed", async () => {
jest
.spyOn(bitcoinRequestFunctions, 'fetchBitcoinTransaction')
.mockImplementationOnce(async () => TEST_TESTNET_FUNDING_TRANSACTION_1);
Expand Down
14 changes: 3 additions & 11 deletions tests/unit/sign-transactions.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Transaction, p2wpkh } from '@scure/btc-signer';
import { testnet } from 'bitcoinjs-lib/src/networks.js';

import { deriveUnhardenedPublicKey } from '../../src/functions/bitcoin/bitcoin-functions.js';
import { PrivateKeyDLCHandler } from '../../src/index.js';
import { shiftValue } from '../../src/utilities/index.js';
import { TEST_TESTNET_ATTESTOR_EXTENDED_GROUP_PUBLIC_KEY_1 } from '../mocks/attestor.test.constants.js';
Expand All @@ -21,7 +19,7 @@ describe('Create and Sign Vault related Transactions', () => {
let fundingTransaction: Transaction;
let signedFundingTransaction: Transaction;

xit('should initialize a Private Key DLC Handler', async () => {
it('should initialize a Private Key DLC Handler', async () => {
dlcHandler = new PrivateKeyDLCHandler(
TEST_BITCOIN_EXTENDED_PRIVATE_KEY,
TEST_BITCOIN_WALLET_ACCOUNT_INDEX,
Expand All @@ -30,15 +28,9 @@ describe('Create and Sign Vault related Transactions', () => {
TEST_BITCOIN_BLOCKCHAIN_API,
TEST_BITCOIN_BLOCKCHAIN_FEE_RECOMMENDATION_API
);

const derivedAttestorGroupPublicKey = deriveUnhardenedPublicKey(
TEST_TESTNET_ATTESTOR_EXTENDED_GROUP_PUBLIC_KEY_1,
testnet
);
console.log('derivedAttestorGroupPublicKey: ', derivedAttestorGroupPublicKey.toString('hex'));
});

xit('should create a funding transaction', async () => {
it('should create a funding transaction', async () => {
fundingTransaction = await dlcHandler.createFundingPSBT(
TEST_VAULT,
BigInt(shiftValue(TEST_BITCOIN_AMOUNT)),
Expand Down Expand Up @@ -71,7 +63,7 @@ describe('Create and Sign Vault related Transactions', () => {
expect(feeOutput?.amount === feeAmount).toBeTruthy();
});

xit('should sign a funding transaction', async () => {
it('should sign a funding transaction', async () => {
signedFundingTransaction = dlcHandler.signPSBT(fundingTransaction, 'funding');

expect(signedFundingTransaction.isFinal).toBeTruthy();
Expand Down

0 comments on commit 103fa66

Please sign in to comment.