Skip to content

All test cases don't pass #33

@BitcoinZavior

Description

@BitcoinZavior

All test cases don't pass.

To Replicate:

npm run npm run test or npm run test:integration and npm run test:unit results in the following:

Screenshot 2022-01-26 at 10 35 33

This is because of env file is not being read to provide the the mnemonics.

Screenshot 2022-01-26 at 10 36 36

Screenshot 2022-01-26 at 10 36 28

Screenshot 2022-01-26 at 10 36 22

Screenshot 2022-01-26 at 10 36 10

Issue and suggested Solution:

  1. To read the env variables from a .env file a dotenv dev dependency is required or an env variables file to be read via process.env.

Once this dev dependency is added it will need to configured in jest or in photon-lib/__tests__/setup.js

  1. Once env file is configured and available, following variables will be needed in the .env file:
MNEMONICS_COBO
MNEMONICS_COLDCARD
HD_MNEMONIC_BIP84
HD_MNEMONIC
FAULTY_ZPUB
HD_MNEMONIC_BIP49
HD_MNEMONIC_BIP49_MANY_TX

  1. Adding the above will ensure all env variables required for running test cases are available HOWEVER the test cases expect specific mnemonics, the test cases have been written to pass only with specific mnemonics for example HD_MNEMONIC_BIP49_MANY_TX should be a mnemonic with a 107 transactions and a total balance of 51432

There could be some other instances where specific values are required.

Also the hardcoded peers might need to be updated as well in case this is an issue.

If all the test cases were passing before then It would be great if someone who has worked on the project before can share a env file which works with the test cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions