orbitdb / orbit-db-control-center

UI for managing OrbitDB databases
86 stars 35 forks source link

Feat: Tests and CI #11

Closed aphelionz closed 3 years ago

aphelionz commented 3 years ago

This PR fixes the simple App.test.js and adds CI support via CircleCI

aphelionz commented 3 years ago

This passes CI but we still have an issue with IPFS:

  ●  Cannot log after tests are done. Did you forget to wait for something async in your test?
    Attempted to log "generating 2048-bit (rsa only) RSA keypair...".

      20 | }
      21 |
    > 22 | export const getAllDatabases = async () => {
         |          ^
      23 |   if (!programs && orbitdb) {
      24 |     // Load programs database
      25 |     programs = await orbitdb.feed('network.programs', {

      at console.log (node_modules/@jest/console/build/CustomConsole.js:185:10)
      at initPeerId (node_modules/ipfs-core/src/components/storage.js:176:3)
      at initRepo (node_modules/ipfs-core/src/components/storage.js:110:13)
      at loadRepo (node_modules/ipfs-core/src/components/storage.js:86:17)
      at Function.start (node_modules/ipfs-core/src/components/storage.js:54:41)
      at Object.create (node_modules/ipfs-core/src/components/index.js:223:21)
      at initIPFS (src/database/index.js:22:10)

(node:76) UnhandledPromiseRejectionWarning: Error: digest should be a Uint8Array
(Use `node --trace-warnings ...` to show where the warning was created)
(node:76) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:76) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

CircleCI received exit code 0