Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
mlibre committed May 24, 2024
1 parent d5104ed commit 1132fb4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/test/blockchain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ describe( "Blockchain Test Suite", () =>
cleanTestDB();
});

test( "serial test", () =>
test( "mining first block", () =>
{
const newBlock = blockchain.mineNewBlock(); // miner: 200
expect( newBlock.index ).toBe( 1 );
});

test( "parallel test", () =>
test( "Sending a transaction from miner to sender and mining a new block", () =>
{
const transaction1 = new Transaction({
from: minerKeys.publicKey,
Expand All @@ -49,7 +49,10 @@ describe( "Blockchain Test Suite", () =>

const blockWithTransaction1 = blockchain.mineNewBlock(); // miner: 250, miner receives his own trx fee
expect( blockWithTransaction1.transactions.length ).toBe( 2 ); // including coinbase transaction
});

test( "parallel test 2", () =>
{
const transaction2 = new Transaction({
from: senderKeys.publicKey,
to: receiverKeys.publicKey,
Expand Down

0 comments on commit 1132fb4

Please sign in to comment.