title: I am getting this error: Block is not a constructor in node.js
body: <p>I am new to Blockchain learning. I am following tutorial. I am getting this error. I am unable to resolve in VS code.</p>
  <pre><code>    const Block = require('./block');
  
  
  
  
  describe('Block',()=&gt; {
      const timestamp='a-date';
      const lastHash='foo-lasthash';
      const hash='foo-hash';
      const data=['foo-data','pdata'];
      const block= new Block({
          timestamp,
          lastHash,
          hash,
          data
  
  
      });
  
      it('has a timestamp,lastHash,hash, and data property',()=&gt;{
        expect(block.timestamp).toEqual(timestamp); 
        expect(block.lastHash).toEqual(lastHash);  
        expect(block.hash).toEqual(hash);  
        expect(block.data).toEqual(data);   
      })
  
  });
  </code></pre>
  <p>Here is the error message:</p>
  <pre><code>FAIL /block.test.js
   Block
    x encountered a declaration exception ( 18ms )
   • Block &gt; encountered a declaration exception
    TypeError : Block is not a constructor
       91 const hash = ' foo - hash ' ;
       10 | const data = [ ' foo - data ' , ' pdata ' ] ;
                const block = new Block ( {
                            A
     &gt; 11
       12 |
       13 |
       14 |
                    timestamp .
                    lastHash ,
                    hash ,
      at Suite . &lt; anonymous &gt; ( block . test.js : 11 : 18 )
       at Object . &lt; anonymous &gt; ( block.test.js : 6 : 1 )
  Test Suites : 1 failed , 1 total
  Tests : 1 failed , 1 total
  Snapshots : 0 total
  Time : 6.734s
  Ran all test suites .
  </code></pre>
  <p>output is shown.. test is failed</p>
  <p><img src="https://i.stack.imgur.com/eCoj2.png" alt="1" /></p>