JoyOfJavaScript / joj

Docker setup for code listings shown in Joy Of JavaScript
MIT License
79 stars 35 forks source link

docker exited (0) #20

Open d1gitalflow opened 3 years ago

d1gitalflow commented 3 years ago
PS C:\Users\tmjj1\Downloads\joj-master\joj-master> docker-compose up
Creating network "joj-master_tjoj-network" with the default driver
Pulling blockchain_tests (node:14.3.0-slim)...
14.3.0-slim: Pulling from library/node
e62d08fa1eb1: Pull complete
faf966cc3d43: Pull complete
a470f7e54c1d: Pull complete
b9c675044353: Pull complete
ee0f4fba66a9: Pull complete
Digest: sha256:7d9fb6e6fe3a1e6c318954dffb8e8dfd7fca3e85c63519724c2437afed4bf47f
Status: Downloaded newer image for node:14.3.0-slim
Creating joj-master_chapter_listings_1 ... done
Creating joj-master_blockchain_tests_1 ... done
Attaching to joj-master_blockchain_tests_1, joj-master_chapter_listings_1
blockchain_tests_1  |
blockchain_tests_1  |
blockchain_tests_1  | > @joj/blockchain@1.0.0 test-all /home/joj/src/blockchain
blockchain_tests_1  | > npm run babel; mocha "_babel/**/*spec.js" --exit; rm -rf _babel
blockchain_tests_1  |
blockchain_tests_1  |
blockchain_tests_1  | > @joj/blockchain@1.0.0 babel /home/joj/src/blockchain
blockchain_tests_1  | > rm -rf _babel && babel src --out-dir _babel/src --keep-file-extension && babel test --out-dir _babel/test --keep-file-extension
blockchain_tests_1  |
blockchain_tests_1  | sh: 1: babel: not found
blockchain_tests_1  | npm ERR! code ELIFECYCLE
blockchain_tests_1  | npm ERR! syscall spawn
blockchain_tests_1  | npm ERR! file sh
blockchain_tests_1  | npm ERR! errno ENOENT
blockchain_tests_1  | npm ERR! @joj/blockchain@1.0.0 babel: `rm -rf _babel && babel src --out-dir _babel/src --keep-file-extension && babel test --out-dir _babel/test --keep-file-extension`
blockchain_tests_1  | npm ERR! spawn ENOENT
blockchain_tests_1  | npm ERR!
blockchain_tests_1  | npm ERR! Failed at the @joj/blockchain@1.0.0 babel script.
blockchain_tests_1  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
blockchain_tests_1  |
blockchain_tests_1  | npm ERR! A complete log of this run can be found in:
blockchain_tests_1  | npm ERR!     /home/node/.npm/_logs/2021-03-04T20_07_06_974Z-debug.log
blockchain_tests_1  | sh: 1: mocha: not found
joj-master_blockchain_tests_1 exited with code 0
chapter_listings_1  | npm ERR! code ENOTEMPTY
chapter_listings_1  | npm ERR! syscall rmdir
chapter_listings_1  | npm ERR! path /home/joj/src/blockchain/node_modules/.staging/lodash-c1dd36cd
chapter_listings_1  | npm ERR! errno -39
chapter_listings_1  | npm ERR! ENOTEMPTY: directory not empty, rmdir '/home/joj/src/blockchain/node_modules/.staging/lodash-c1dd36cd'
chapter_listings_1  |
chapter_listings_1  | npm ERR! A complete log of this run can be found in:
chapter_listings_1  | npm ERR!     /home/node/.npm/_logs/2021-03-04T20_07_08_248Z-debug.log
chapter_listings_1  |
chapter_listings_1  | > @joj/blockchain@1.0.0 build /home/joj/src/blockchain
chapter_listings_1  | > rm -rf dist && babel src --out-dir dist --keep-file-extension --ignore "src/**/*.js.flow" --copy-files && cp -f package.json dist
chapter_listings_1  |
chapter_listings_1  | sh: 1: babel: not found
chapter_listings_1  | npm ERR! code ELIFECYCLE
chapter_listings_1  | npm ERR! syscall spawn
chapter_listings_1  | npm ERR! file sh
chapter_listings_1  | npm ERR! errno ENOENT
chapter_listings_1  | npm ERR! @joj/blockchain@1.0.0 build: `rm -rf dist && babel src --out-dir dist --keep-file-extension --ignore "src/**/*.js.flow" --copy-files && cp -f package.json dist`
chapter_listings_1  | npm ERR! spawn ENOENT
chapter_listings_1  | npm ERR!
chapter_listings_1  | npm ERR! Failed at the @joj/blockchain@1.0.0 build script.
chapter_listings_1  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
chapter_listings_1  |
chapter_listings_1  | npm ERR! A complete log of this run can be found in:
chapter_listings_1  | npm ERR!     /home/node/.npm/_logs/2021-03-04T20_07_14_874Z-debug.log
chapter_listings_1  | Love nodemon? You can now support the project via the open collective:
chapter_listings_1  |  > https://opencollective.com/nodemon/donate
chapter_listings_1  |
chapter_listings_1  | added 788 packages from 427 contributors and audited 862 packages in 91.912s
chapter_listings_1  |
chapter_listings_1  | 29 packages are looking for funding
chapter_listings_1  |   run `npm fund` for details
chapter_listings_1  |
chapter_listings_1  | found 11 low severity vulnerabilities
chapter_listings_1  |   run `npm audit fix` to fix them, or `npm audit` for details
chapter_listings_1  |
chapter_listings_1  | > @joj/chapter-listings@0.1.0 test-all /home/joj/src/chapter-listings
chapter_listings_1  | > npm run check ; rm -rf _babel && npm run build; mocha "_babel/**/*spec.mjs"; rm -rf _babel
chapter_listings_1  |
chapter_listings_1  |
chapter_listings_1  | > @joj/chapter-listings@0.1.0 check /home/joj/src/chapter-listings
chapter_listings_1  | > npm run flow-stop ; npm run flow
chapter_listings_1  |
chapter_listings_1  |
chapter_listings_1  | > @joj/chapter-listings@0.1.0 flow-stop /home/joj/src/chapter-listings
chapter_listings_1  | > flow stop
chapter_listings_1  |
chapter_listings_1  | Trying to connect to server for `/home/joj/src/chapter-listings`
chapter_listings_1  | Warning: no server to kill for `/home/joj/src/chapter-listings`
chapter_listings_1  |
chapter_listings_1  | > @joj/chapter-listings@0.1.0 flow /home/joj/src/chapter-listings
chapter_listings_1  | > flow
chapter_listings_1  |
chapter_listings_1  | Launching Flow server for /home/joj/src/chapter-listings
chapter_listings_1  | Spawned flow server (pid=164)
chapter_listings_1  | Logs will go to /tmp/flow/zShomezSjojzSsrczSchapter-listings.log
chapter_listings_1  | Monitor logs will go to /tmp/flow/zShomezSjojzSsrczSchapter-listings.monitor_log
chapter_listings_1  | Started a new flow server: -Please wait. Server is starting up
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 1000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 2000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 3000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 3000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 3000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 3000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 3000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 3000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 3000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 4000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 4000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 4000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 4000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 4000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 4000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 4000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 4000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 4000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 5000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 5000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 5000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 5000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 5000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 5000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 5000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 5000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 5000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 6000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 6000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 6000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 6000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 6000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 6000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 6000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 6000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 7000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 7000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 7000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 7000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 7000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 7000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 7000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 7000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 7000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 7000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 8000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 9000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 9000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 9000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 9000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 9000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 9000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 9000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 9000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 10000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 10000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 10000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 10000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 10000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 10000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 10000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 10000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 10000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 10000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 10000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 11000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 12000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 12000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 12000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 12000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 12000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13000)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 13295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 14295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 14295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 14295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 14295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 14295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 14295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 14295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 14295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 15295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16478)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16478)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16478)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16478)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16478)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16478)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16478)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16478)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16478)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16478)
chapter_listings_1  | Please wait. Server is initializing (resolving dependencies)
chapter_listings_1  | Please wait. Server is initializing (resolving dependencies)
chapter_listings_1  | Please wait. Server is initializing (waiting for Watchman - giving up in 119 seconds)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0/0 (0.0%))
chapter_listings_1  | Please wait. Server is initializing (calculating dependencies)
chapter_listings_1  | Please wait. Server is initializing (merged files 0/5 (0.0%))
chapter_listings_1  | Please wait. Server is initializing (finishing up)
chapter_listings_1  | Please wait. Server is handling a request (starting up)
chapter_listings_1  | Please wait. Server is handling a request (collating errors)
chapter_listings_1  | No errors!
chapter_listings_1  |
chapter_listings_1  | > @joj/chapter-listings@0.1.0 build /home/joj/src/chapter-listings
chapter_listings_1  | > babel src --out-dir _babel/src --keep-file-extension --copy-files
chapter_listings_1  |
chapter_listings_1  | @babel/preset-env: `DEBUG` option
chapter_listings_1  |
chapter_listings_1  | Using targets:
chapter_listings_1  | {
chapter_listings_1  |   "node": "14.3"
chapter_listings_1  | }
chapter_listings_1  |
chapter_listings_1  | Using modules transform: false
chapter_listings_1  |
chapter_listings_1  | Using plugins:
chapter_listings_1  |   syntax-nullish-coalescing-operator { "node":"14.3" }
chapter_listings_1  |   syntax-optional-chaining { "node":"14.3" }
chapter_listings_1  |   syntax-json-strings { "node":"14.3" }
chapter_listings_1  |   syntax-optional-catch-binding { "node":"14.3" }
chapter_listings_1  |   syntax-async-generators { "node":"14.3" }
chapter_listings_1  |   syntax-object-rest-spread { "node":"14.3" }
chapter_listings_1  |   syntax-dynamic-import { "node":"14.3" }
chapter_listings_1  |
chapter_listings_1  | Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set.
chapter_listings_1  | Successfully compiled 91 files with Babel (19418ms).
chapter_listings_1  |
chapter_listings_1  | Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/joj/src/chapter-listings/node_modules/@joj/blockchain/domain/service/BitcoinService.js' imported from /home/joj/src/chapter-listings/_babel/src/ch01/1-2.spec.mjs
chapter_listings_1  |     at finalizeResolution (internal/modules/esm/resolve.js:284:11)
chapter_listings_1  |     at packageResolve (internal/modules/esm/resolve.js:613:12)
chapter_listings_1  |     at moduleResolve (internal/modules/esm/resolve.js:659:14)
chapter_listings_1  |     at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:752:11)
chapter_listings_1  |     at Loader.resolve (internal/modules/esm/loader.js:97:40)
chapter_listings_1  |     at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
chapter_listings_1  |     at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:50:40)
chapter_listings_1  |     at link (internal/modules/esm/module_job.js:49:36)
joj-master_chapter_listings_1 exited with code 0
PS C:\Users\tmjj1\Downloads\joj-master\joj-master>
luijar commented 3 years ago

Funny, I don't see the npm install command running. mmm..

d1gitalflow commented 3 years ago

Ok. Progress made.. Im running windows 10, had to instal WSL 2 (Ubuntu terminal) + Docker within the Ubuntu terminal Blockchain_tests_1 fails 3 tests Chapter_listings_1 fails 1 test

Logs:

jimjones@DESKTOP-6HKRSMQ:~/Documents/joj-master$ docker-compose up
Starting joj-master_blockchain_tests_1 ... done
Starting joj-master_chapter_listings_1 ... done
Attaching to joj-master_blockchain_tests_1, joj-master_chapter_listings_1
chapter_listings_1  |
chapter_listings_1  | > @joj/blockchain@1.0.0 postinstall /home/joj/src/blockchain
chapter_listings_1  | > link-module-alias
chapter_listings_1  |
chapter_listings_1  | link-module-alias: ~util -> src/util, ~domain -> src/domain
blockchain_tests_1  |
chapter_listings_1  | removed 2 packages and audited 921 packages in 5.031s
blockchain_tests_1  |
blockchain_tests_1  | > @joj/blockchain@1.0.0 test-all /home/joj/src/blockchain
blockchain_tests_1  | > npm run babel; mocha "_babel/**/*spec.js" --exit; rm -rf _babel
blockchain_tests_1  |
chapter_listings_1  |
chapter_listings_1  | 26 packages are looking for funding
chapter_listings_1  |   run `npm fund` for details
chapter_listings_1  |
chapter_listings_1  | found 17 low severity vulnerabilities
chapter_listings_1  |   run `npm audit fix` to fix them, or `npm audit` for details
blockchain_tests_1  |
blockchain_tests_1  | > @joj/blockchain@1.0.0 babel /home/joj/src/blockchain
blockchain_tests_1  | > rm -rf _babel && babel src --out-dir _babel/src --keep-file-extension && babel test --out-dir _babel/test --keep-file-extension
blockchain_tests_1  |
chapter_listings_1  |
chapter_listings_1  | > @joj/blockchain@1.0.0 build /home/joj/src/blockchain
chapter_listings_1  | > rm -rf dist && babel src --out-dir dist --keep-file-extension --ignore "src/**/*.js.flow" --copy-files && cp -f package.json dist
chapter_listings_1  |
blockchain_tests_1  | @babel/preset-env: `DEBUG` option
blockchain_tests_1  |
blockchain_tests_1  | Using targets:
blockchain_tests_1  | {
blockchain_tests_1  |   "node": "14.3"
blockchain_tests_1  | }
blockchain_tests_1  |
blockchain_tests_1  | Using modules transform: false
blockchain_tests_1  |
blockchain_tests_1  | Using plugins:
blockchain_tests_1  |   syntax-numeric-separator { "node":"14.3" }
blockchain_tests_1  |   proposal-logical-assignment-operators { "node":"14.3" }
blockchain_tests_1  |   syntax-nullish-coalescing-operator { "node":"14.3" }
blockchain_tests_1  |   syntax-optional-chaining { "node":"14.3" }
blockchain_tests_1  |   syntax-json-strings { "node":"14.3" }
blockchain_tests_1  |   syntax-optional-catch-binding { "node":"14.3" }
blockchain_tests_1  |   syntax-async-generators { "node":"14.3" }
blockchain_tests_1  |   syntax-object-rest-spread { "node":"14.3" }
blockchain_tests_1  |   syntax-dynamic-import { "node":"14.3" }
blockchain_tests_1  |   syntax-export-namespace-from { "node":"14.3" }
blockchain_tests_1  |
blockchain_tests_1  | Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set.
chapter_listings_1  | @babel/preset-env: `DEBUG` option
chapter_listings_1  |
chapter_listings_1  | Using targets:
chapter_listings_1  | {
chapter_listings_1  |   "node": "14.3"
chapter_listings_1  | }
chapter_listings_1  |
chapter_listings_1  | Using modules transform: false
chapter_listings_1  |
chapter_listings_1  | Using plugins:
chapter_listings_1  |   syntax-numeric-separator { "node":"14.3" }
chapter_listings_1  |   proposal-logical-assignment-operators { "node":"14.3" }
chapter_listings_1  |   syntax-nullish-coalescing-operator { "node":"14.3" }
chapter_listings_1  |   syntax-optional-chaining { "node":"14.3" }
chapter_listings_1  |   syntax-json-strings { "node":"14.3" }
chapter_listings_1  |   syntax-optional-catch-binding { "node":"14.3" }
chapter_listings_1  |   syntax-async-generators { "node":"14.3" }
chapter_listings_1  |   syntax-object-rest-spread { "node":"14.3" }
chapter_listings_1  |   syntax-dynamic-import { "node":"14.3" }
chapter_listings_1  |   syntax-export-namespace-from { "node":"14.3" }
chapter_listings_1  |
chapter_listings_1  | Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set.
blockchain_tests_1  | Successfully compiled 90 files with Babel (1470ms).
chapter_listings_1  | Successfully compiled 90 files with Babel (1462ms).
blockchain_tests_1  | @babel/preset-env: `DEBUG` option
blockchain_tests_1  |
blockchain_tests_1  | Using targets:
blockchain_tests_1  | {
blockchain_tests_1  |   "node": "14.3"
blockchain_tests_1  | }
blockchain_tests_1  |
blockchain_tests_1  | Using modules transform: false
blockchain_tests_1  |
blockchain_tests_1  | Using plugins:
blockchain_tests_1  |   syntax-numeric-separator { "node":"14.3" }
blockchain_tests_1  |   proposal-logical-assignment-operators { "node":"14.3" }
blockchain_tests_1  |   syntax-nullish-coalescing-operator { "node":"14.3" }
blockchain_tests_1  |   syntax-optional-chaining { "node":"14.3" }
blockchain_tests_1  |   syntax-json-strings { "node":"14.3" }
blockchain_tests_1  |   syntax-optional-catch-binding { "node":"14.3" }
blockchain_tests_1  |   syntax-async-generators { "node":"14.3" }
blockchain_tests_1  |   syntax-object-rest-spread { "node":"14.3" }
blockchain_tests_1  |   syntax-dynamic-import { "node":"14.3" }
blockchain_tests_1  |   syntax-export-namespace-from { "node":"14.3" }
blockchain_tests_1  |
blockchain_tests_1  | Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set.
blockchain_tests_1  | Successfully compiled 4 files with Babel (552ms).
blockchain_tests_1  | Height:  1
blockchain_tests_1  |
blockchain_tests_1  |
blockchain_tests_1  |   Dynamically import settings
blockchain_tests_1  |     ✓ Should dynamically read out MINING_REWARD from settings
blockchain_tests_1  |
blockchain_tests_1  |   Block Spec
blockchain_tests_1  |     ✓ Should create genesis block
blockchain_tests_1  |     ✓ Should create a new block using Builders
blockchain_tests_1  |     ✓ Should create a new  block using Builders with bind operator
blockchain_tests_1  |     ✓ Should serialize a block and its contained transaction data
blockchain_tests_1  |     ✓ Should init a new block
blockchain_tests_1  |     ✓ Should init a new trasactional block
blockchain_tests_1  | Hash:  2fdb5f818f88985368058b2cec041286c9dd86f6e0754978507446aaad862b75
blockchain_tests_1  |     ✓ Should check core properties
blockchain_tests_1  | Found 0 pending transactions in block
blockchain_tests_1  |     1) Should validate block
blockchain_tests_1  | Success ([object Block])
blockchain_tests_1  |     ✓ Should validate block 2
blockchain_tests_1  | Failure (Block out of order [previous (2) next (0)])
blockchain_tests_1  |     ✓ Should fail validation of two consecutive blocks
blockchain_tests_1  |     ✓ Tests toString
blockchain_tests_1  |
blockchain_tests_1  |   Blockchain Spec
blockchain_tests_1  | Execution time took 2000 nanoseconds
blockchain_tests_1  |     ✓ Should create a block chain and assert if valid
blockchain_tests_1  | Generated new block df9acbde9d3de4639a63d2407d00d597c352067722443044158cd87c744d5950
blockchain_tests_1  | Generated new block 0ce7f6d130a8f765ab71d4cba7dbd6edcf2c4656261c8b82111113813f0e2366
blockchain_tests_1  | Generated new block 827875b57e6d6b3cb669efa0ee4da56e84b75f81e7e85f575f3a5a0de443c723
blockchain_tests_1  | Generated new block 9d73f4b5608c337a7a83292d99eb1009b773d8ac698511e105b0ee416a06988e
blockchain_tests_1  | Generated new block de0d2d276cb0b9ba0db927c2e67163ef02f952666b1e4cd71480386fe7b28714
blockchain_tests_1  | Generated new block 733b011d0db83df3e7bd296fcf79b98de2900ca027f348831c0e588cc1459332
blockchain_tests_1  | Generated new block 70aed8829566b98266474375d89ab45465896e2562888b2ad1433532aa870397
blockchain_tests_1  | Generated new block 55d9e81ba946d0c5800841654ca91fa6ce40a2cf354fbc1be5e03c15eed34546
blockchain_tests_1  | Generated new block 6c282eda778b1a9a4a82cb6ce9609de882d58b6699d0af39002c8dcdb87c023d
blockchain_tests_1  | Generated new block 0ff3d90e469ed8151418bf36f2b3653bc717effa3d706fcf66ce98e26a0afde4
blockchain_tests_1  | Generated new block 8255e4bd9e29dbf46677411793882d2a2285bc634c77e328b2c972ca6caa19f8
blockchain_tests_1  | Generated new block 3a0b322e02c34ffd924cfaca9fbb7a94a1b09f1eadbb9f4b7558a9224f0c93a7
blockchain_tests_1  | Generated new block 41d62d97fc12e72582d161c80a6c0dea90befa5654d05de53486a8efd6fec74c
blockchain_tests_1  | Generated new block 0f74fce22637851404f5f8ddd1c2d78e25ac438c88cd8998b9ce140cfdad04aa
blockchain_tests_1  | Generated new block e7fab95b03090689046a7b27f2aed1c235ecbdddf9a2199e04b4b8d996c8422d
blockchain_tests_1  | Generated new block fd5b2c0fe55ea47a7a72ae0e8b5555e28df2441bfb88f504903bde521f105388
blockchain_tests_1  | Generated new block 1b9fb68a3c5a25bd2a192a663deff579e2852f778e3f2e2ee28cd2ca9afe3879
blockchain_tests_1  | Generated new block 50ae8a2255b6ffefd86ac77da08f71b96668685b88702a328feb0e29e6d966dd
blockchain_tests_1  | Generated new block a3b00316776322c52f57153ce1314259185649ffb93ae985616664c42196afab
blockchain_tests_1  | Generated new block c759c0cb906c60255e83db4a28726ba47e0c2da37dda839c982bb9457b7eacbb
blockchain_tests_1  |     ✓ Generates 20 blocks
blockchain_tests_1  | Failure (Block out of order [previous (2) next (0)])
blockchain_tests_1  |     ✓ Should fail validation of two consecutive blocks
blockchain_tests_1  |     ✓ Promise.allSettled used to validate two blockchain objects
blockchain_tests_1  | Received block 1156c6431389a4a9041ad29ebf3680e6b6f4e1a209c30f628b8ccd64e05cca55
blockchain_tests_1  | Block is valid
blockchain_tests_1  | Received block 6d081d58e7f69f4ef8de2f66dbbe9985b6fabacc02947d9e0fb9bf5f784cf9f3
blockchain_tests_1  | Block is valid
blockchain_tests_1  | Received block 093cb9437214f0e6dca7e7c321e3a0d2fe1c58d3194b1fa34774ec2f0f87f8f1
blockchain_tests_1  | Block is valid
chapter_listings_1  | added 4 packages from 2 contributors and audited 862 packages in 5.588s
chapter_listings_1  |
chapter_listings_1  | 29 packages are looking for funding
chapter_listings_1  |   run `npm fund` for details
chapter_listings_1  |
chapter_listings_1  | found 11 low severity vulnerabilities
chapter_listings_1  |   run `npm audit fix` to fix them, or `npm audit` for details
chapter_listings_1  |
chapter_listings_1  | > @joj/chapter-listings@0.1.0 test-all /home/joj/src/chapter-listings
chapter_listings_1  | > npm run check ; rm -rf _babel && npm run build; mocha "_babel/**/*spec.mjs"; rm -rf _babel
chapter_listings_1  |
chapter_listings_1  |
chapter_listings_1  | > @joj/chapter-listings@0.1.0 check /home/joj/src/chapter-listings
chapter_listings_1  | > npm run flow-stop ; npm run flow
chapter_listings_1  |
chapter_listings_1  |
chapter_listings_1  | > @joj/chapter-listings@0.1.0 flow-stop /home/joj/src/chapter-listings
chapter_listings_1  | > flow stop
chapter_listings_1  |
chapter_listings_1  | Trying to connect to server for `/home/joj/src/chapter-listings`
chapter_listings_1  | Warning: no server to kill for `/home/joj/src/chapter-listings`
chapter_listings_1  |
chapter_listings_1  | > @joj/chapter-listings@0.1.0 flow /home/joj/src/chapter-listings
chapter_listings_1  | > flow
chapter_listings_1  |
chapter_listings_1  | Launching Flow server for /home/joj/src/chapter-listings
chapter_listings_1  | Spawned flow server (pid=156)
chapter_listings_1  | Logs will go to /tmp/flow/zShomezSjojzSsrczSchapter-listings.log
chapter_listings_1  | Monitor logs will go to /tmp/flow/zShomezSjojzSsrczSchapter-listings.monitor_log
chapter_listings_1  | Started a new flow server: -Please wait. Server is starting up
chapter_listings_1  | Please wait. Server is initializing (starting up)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0)
chapter_listings_1  | Please wait. Server is initializing (parsed files 14295)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16575)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16575)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16575)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16575)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16575)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16575)
blockchain_tests_1  |     ✓ Uses Observable.from to push new blocks into the stream (10005ms)
blockchain_tests_1  |
blockchain_tests_1  |   BitcoinService Spec
blockchain_tests_1  |     ✓ Write a chain object to a file
blockchain_tests_1  | /home/joj/src/blockchain/src/domain/service/file.txt was deleted
blockchain_tests_1  |     ✓ Uses Symbol.toStringTag
blockchain_tests_1  |
blockchain_tests_1  |   Proof of work
blockchain_tests_1  |     ✓ Calls proof of work with low difficulty
chapter_listings_1  | Please wait. Server is initializing (parsed files 16575)
chapter_listings_1  | Please wait. Server is initializing (parsed files 16575)
blockchain_tests_1  |     ✓ Calls proof of work async (1006ms)
chapter_listings_1  | Please wait. Server is initializing (resolving dependencies)
chapter_listings_1  | Please wait. Server is initializing (waiting for Watchman - giving up in 119 seconds)
chapter_listings_1  | Please wait. Server is initializing (parsed files 0/0 (0.0%))
chapter_listings_1  | Please wait. Server is initializing (calculating dependencies)
chapter_listings_1  | Please wait. Server is initializing (merged files 0/12 (0.0%))
chapter_listings_1  | Please wait. Server is initializing (finishing up)
chapter_listings_1  | Please wait. Server is handling a request (starting up)
chapter_listings_1  | Please wait. Server is handling a request (collating errors)
chapter_listings_1  | Error ---------------------------------------------------------------- ../blockchain/dist/domain/Blockchain.js.flow:4:33
chapter_listings_1  |
chapter_listings_1  | Cannot resolve module `../util/fp/data/validation2/validation.js.flow`.
chapter_listings_1  |
chapter_listings_1  |    4| import type { Validation } from '../util/fp/data/validation2/validation.js.flow'
chapter_listings_1  |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
chapter_listings_1  |
chapter_listings_1  |
chapter_listings_1  |
chapter_listings_1  | Found 1 error
chapter_listings_1  | npm ERR! code ELIFECYCLE
chapter_listings_1  | npm ERR! errno 2
chapter_listings_1  | npm ERR! @joj/chapter-listings@0.1.0 flow: `flow`
chapter_listings_1  | npm ERR! Exit status 2
chapter_listings_1  | npm ERR!
chapter_listings_1  | npm ERR! Failed at the @joj/chapter-listings@0.1.0 flow script.
chapter_listings_1  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
chapter_listings_1  |
chapter_listings_1  | npm ERR! A complete log of this run can be found in:
chapter_listings_1  | npm ERR!     /home/node/.npm/_logs/2021-03-05T03_38_07_076Z-debug.log
chapter_listings_1  | npm ERR! code ELIFECYCLE
chapter_listings_1  | npm ERR! errno 2
chapter_listings_1  | npm ERR! @joj/chapter-listings@0.1.0 check: `npm run flow-stop ; npm run flow`
chapter_listings_1  | npm ERR! Exit status 2
chapter_listings_1  | npm ERR!
chapter_listings_1  | npm ERR! Failed at the @joj/chapter-listings@0.1.0 check script.
chapter_listings_1  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
chapter_listings_1  |
chapter_listings_1  | npm ERR! A complete log of this run can be found in:
chapter_listings_1  | npm ERR!     /home/node/.npm/_logs/2021-03-05T03_38_07_088Z-debug.log
chapter_listings_1  |
chapter_listings_1  | > @joj/chapter-listings@0.1.0 build /home/joj/src/chapter-listings
chapter_listings_1  | > babel src --out-dir _babel/src --keep-file-extension --copy-files
chapter_listings_1  |
blockchain_tests_1  |     ✓ Run two proof of work in parallel (1020ms)
chapter_listings_1  | @babel/preset-env: `DEBUG` option
chapter_listings_1  |
chapter_listings_1  | Using targets:
chapter_listings_1  | {
chapter_listings_1  |   "node": "14.3"
chapter_listings_1  | }
chapter_listings_1  |
chapter_listings_1  | Using modules transform: false
chapter_listings_1  |
chapter_listings_1  | Using plugins:
chapter_listings_1  |   syntax-nullish-coalescing-operator { "node":"14.3" }
chapter_listings_1  |   syntax-optional-chaining { "node":"14.3" }
chapter_listings_1  |   syntax-json-strings { "node":"14.3" }
chapter_listings_1  |   syntax-optional-catch-binding { "node":"14.3" }
chapter_listings_1  |   syntax-async-generators { "node":"14.3" }
chapter_listings_1  |   syntax-object-rest-spread { "node":"14.3" }
chapter_listings_1  |   syntax-dynamic-import { "node":"14.3" }
chapter_listings_1  |
chapter_listings_1  | Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set.
blockchain_tests_1  |     ✓ Race two proof of work (1001ms)
blockchain_tests_1  |
blockchain_tests_1  |   Proof of work (2)
blockchain_tests_1  |     ✓ Simple test on optional chaining with null coallesce
blockchain_tests_1  |     ✓ Calls proof of work with low difficulty
blockchain_tests_1  | JSON debug {
blockchain_tests_1  |   index: 1,
blockchain_tests_1  |   previousHash: '28071d2009ad5e3325d73a30b639fa45',
blockchain_tests_1  |   hash: 'f2871337a24ae487fd3569663c2ff1be241f01b75054b14a443097ce0b699348',
blockchain_tests_1  |   timestamp: 1614915488466,
blockchain_tests_1  |   difficulty: 3,
blockchain_tests_1  |   dataCount: 0,
blockchain_tests_1  |   data: [],
blockchain_tests_1  |   version: '1.0'
blockchain_tests_1  | }
blockchain_tests_1  |     ✓ Calls proof of work async (114ms)
blockchain_tests_1  | JSON debug {
blockchain_tests_1  |   index: 1,
blockchain_tests_1  |   previousHash: '70705469e682460af6f7c502c777e986',
blockchain_tests_1  |   hash: 'c8ff38d69da430aca2fd7324b7859c0de333507146dfb669a4ab9b27e9e3789a',
blockchain_tests_1  |   timestamp: 1614915488580,
blockchain_tests_1  |   difficulty: 1,
blockchain_tests_1  |   dataCount: 0,
blockchain_tests_1  |   data: [],
blockchain_tests_1  |   version: '1.0'
blockchain_tests_1  | }
blockchain_tests_1  | JSON debug {
blockchain_tests_1  |   index: 2,
blockchain_tests_1  |   previousHash: '18167b89ff4cdbc7fc402e1fe61a1686',
blockchain_tests_1  |   hash: '4691a504e66fbfdf9f3d14815e6731dc709c620f853d3bccd9c6fe14b08fa49d',
blockchain_tests_1  |   timestamp: 1614915488581,
blockchain_tests_1  |   difficulty: 4,
blockchain_tests_1  |   dataCount: 0,
blockchain_tests_1  |   data: [],
blockchain_tests_1  |   version: '1.0'
blockchain_tests_1  | }
blockchain_tests_1  |     ✓ Run two proof of work in parallel (222ms)
blockchain_tests_1  | JSON debug {
blockchain_tests_1  |   index: 1,
blockchain_tests_1  |   previousHash: 'fceed9bf7dc4df0339b7f45c1f1f5a8b',
blockchain_tests_1  |   hash: '21c535aaa80b6090621ddd28c519c86eadb788fd85660bc14bdccd398914afd6',
blockchain_tests_1  |   timestamp: 1614915488803,
blockchain_tests_1  |   difficulty: 1,
blockchain_tests_1  |   dataCount: 0,
blockchain_tests_1  |   data: [],
blockchain_tests_1  |   version: '1.0'
blockchain_tests_1  | }
blockchain_tests_1  | JSON debug {
blockchain_tests_1  |   index: 2,
blockchain_tests_1  |   previousHash: '482e19edd562718f6cceea723b2b02be',
blockchain_tests_1  |   hash: '5dd6ddcf56be16b2f2ef2c512548a845ab643a955cb0894ef34cd62b01d3187f',
blockchain_tests_1  |   timestamp: 1614915488804,
blockchain_tests_1  |   difficulty: 4,
blockchain_tests_1  |   dataCount: 0,
blockchain_tests_1  |   data: [],
blockchain_tests_1  |   version: '1.0'
blockchain_tests_1  | }
blockchain_tests_1  |     ✓ Race two proof of work (75ms)
blockchain_tests_1  | JSON debug {
blockchain_tests_1  |   index: 1,
blockchain_tests_1  |   previousHash: 'f7d728aa7842fe14ed32199f0505d67f',
blockchain_tests_1  |   hash: 'd626466a6ebb988f72e9af5283a5ea63aceb323cdbb6853db89b958e2b6152f7',
blockchain_tests_1  |   timestamp: 1614915488878,
blockchain_tests_1  |   difficulty: 6,
blockchain_tests_1  |   dataCount: 0,
blockchain_tests_1  |   data: [],
blockchain_tests_1  |   version: '1.0'
blockchain_tests_1  | }
chapter_listings_1  | Successfully compiled 91 files with Babel (1889ms).
chapter_listings_1  |
chapter_listings_1  |
chapter_listings_1  |   1.2 - Blockchain transfers
chapter_listings_1  | Found 1 pending transactions in block
chapter_listings_1  | Cannot find module '/home/joj/src/blockchain/dist/domain/service/bitcoinService/proof_of_work2.js' imported from /home/joj/src/blockchain/dist/domain/service/BitcoinService.js
chapter_listings_1  |     1) Shows a few transfers
chapter_listings_1  |
chapter_listings_1  |   1.3.1 - No blueprints, just prototypes
chapter_listings_1  |     ✓ DedupCollection
chapter_listings_1  |
chapter_listings_1  |   1.3.2 - JavaScript objects: no fluff, just stuff
chapter_listings_1  |     ✓ Object literals
chapter_listings_1  |     ✓ Object constructor
chapter_listings_1  |     ✓ Classes
chapter_listings_1  |     ✓ Delegation
chapter_listings_1  |     ✓ Functional Mixins
chapter_listings_1  |
chapter_listings_1  |   1.3.4 - Inheritance vs composition: why not both?
chapter_listings_1  |     ✓ Block class with composed mixins
chapter_listings_1  |     ✓ Object.assign vs compose
chapter_listings_1  |
chapter_listings_1  |   1.4.1 - Algebraic Coding
chapter_listings_1  |     ✓ Implement read using Validation ADT
chapter_listings_1  |     ✓ countBlocksInFile using Validation#map
chapter_listings_1  |
chapter_listings_1  |   1.4 - Higher-order functional programming
chapter_listings_1  |     ✓ Functions are objects
chapter_listings_1  |     ✓ Compose using reduce
chapter_listings_1  |
chapter_listings_1  |   1.5 - Separating concerns like a pro
chapter_listings_1  | Execution time: 0s 0.0091ms
chapter_listings_1  |     ✓ Perf counter using proxy
chapter_listings_1  |
chapter_listings_1  |   1.6 - Taming asynchronous code
chapter_listings_1  | Result is:  7
chapter_listings_1  |     ✓ CountBlocksInFile using async/await
chapter_listings_1  |
chapter_listings_1  |   1.7 - Up and coming features
chapter_listings_1  |     ✓ Bind operator
chapter_listings_1  |
chapter_listings_1  |   2.1.2 - Differential inheritance
chapter_listings_1  |     ✓ Adds calculateHash to transaction
chapter_listings_1  |     ✓ Differentiate using Object.setPrototypeOf
chapter_listings_1  |
chapter_listings_1  |   2.1 - Reviewing "prototypal inheritance"
chapter_listings_1  |     ✓ Simple proto
chapter_listings_1  |     ✓ Transaction objects linked using a basic prototype setup
chapter_listings_1  |
chapter_listings_1  |   2.2 - Constructor functions
chapter_listings_1  |     ✓ Transaction hierarchy using constructor functions
chapter_listings_1  |     ✓ Omit new.target check
chapter_listings_1  |     ✓ Fat-finger prototype references
chapter_listings_1  |
chapter_listings_1  |   2.3.2 - Limitations of JavaScript class system
chapter_listings_1  | Transaction from luke@joj.com to luis@joj.com
chapter_listings_1  |     ✓ Studies Fragile base object
chapter_listings_1  |
chapter_listings_1  |   2.3.1 - Prototypes !== classes
chapter_listings_1  |     ✓ Listing 2.3 Transaction hierarchy using constructor functions
chapter_listings_1  |     ✓ Transaction using IIFE
chapter_listings_1  |
chapter_listings_1  |   3.1 - Object/behavior delegation with OLOO
chapter_listings_1  |     ✓ Listing 3.1 HashTransaction using simple object linking
chapter_listings_1  |
chapter_listings_1  |   3.2.1 - Explicit Delegation
chapter_listings_1  |     ✓ Listing 3.2 Explicit delegation from Blockchain to its internal array store
chapter_listings_1  |     ✓ Shows a version of Blockchain based on an internal Map
chapter_listings_1  |
chapter_listings_1  |   3.2.2 - Implicit Delegation
chapter_listings_1  |     ✓ Using a constructor function
chapter_listings_1  |     ✓ Classes
chapter_listings_1  |     ✓ Array-like + constructor function
chapter_listings_1  |     ✓ OLOO
chapter_listings_1  |     ✓ Listing 3.2 - Modeling Transaction using behavior delegation (OLOO)
chapter_listings_1  |
chapter_listings_1  |   3.3 - Functional Mixins
chapter_listings_1  |     ✓ 3.3.1 - Object.assign uncovered
chapter_listings_1  |
chapter_listings_1  |   3.3 - Functional Mixins
chapter_listings_1  |     ✓ 3.3.2 - Assignment vs definition
chapter_listings_1  |
chapter_listings_1  |   3.4.1 - Mixin linearization
chapter_listings_1  |     ✓ Simple mixin linearization
chapter_listings_1  |     ✓ Blockchain definition using mixins
chapter_listings_1  |     ✓ Listing 3.8 Block definition
chapter_listings_1  |     ✓ Listing 3.9 Wallet object
chapter_listings_1  |
chapter_listings_1  |   3.4 - Assembling objects using mixins
chapter_listings_1  |     ✓ Simple mixin composition
chapter_listings_1  |     ✓ Simple mixin composition using spread operator
chapter_listings_1  |     ✓ Listing 3.3 Transaction object using mixin concatenation
chapter_listings_1  |     ✓ Listing 3.4 HasHash mixin
chapter_listings_1  |     ✓ Listing 3.5 HasSignature mixin
chapter_listings_1  |
chapter_listings_1  |   4.1 - What is functional programming, exactly?
chapter_listings_1  |     ✓ Demonstrates using higher-order functions
chapter_listings_1  |     ✓ 4.1.2 - Shows why Array.sort is impure
chapter_listings_1  |
chapter_listings_1  |   4.1.2 - Convert imperative to functional
chapter_listings_1  |     ✓ Imperative
chapter_listings_1  |     ✓ Functional
chapter_listings_1  |
chapter_listings_1  |   4.2.1 - Decomposing complex code
chapter_listings_1  |     ✓ Before decomposing
chapter_listings_1  |     ✓ After decomposing
chapter_listings_1  |     ✓ After decomposing, using a recursive version of computeCipher
chapter_listings_1  |
chapter_listings_1  |   4.2.2 - Working with side effects
chapter_listings_1  |     ✓ Imperative function that counts words in a text file
chapter_listings_1  |     ✓ Counting words using manual composition
chapter_listings_1  |     ✓ Counting words using compose2
chapter_listings_1  |     ✓ Shows simple reduce
chapter_listings_1  |     ✓ countWordsInFile implemented with compose
chapter_listings_1  |
chapter_listings_1  |   4.2 - Composition: the functional way
chapter_listings_1  |     ✓ Demonstrates compose2
chapter_listings_1  |
chapter_listings_1  |   4.3.1 - Curried Function Application
chapter_listings_1  |     ✓ Working with prop and props
chapter_listings_1  |     ✓ Curried versions of prop
chapter_listings_1  |
chapter_listings_1  |   4.3.2 - The curry and composition duo
chapter_listings_1  |     ✓ Secure compute cipher for HasHash mixin
chapter_listings_1  |     ✓ Implements HasHash mixin
chapter_listings_1  |
chapter_listings_1  |   4.3 - Lazy coding
chapter_listings_1  |     ✓ Use default value to assert preconditions
chapter_listings_1  |     ✓ Shows add manually curried
chapter_listings_1  |
chapter_listings_1  |   4.4 - Working with immutable objects
chapter_listings_1  |     ✓ Working with Money Value Object
chapter_listings_1  |     ✓ Implements HasHash mixin by sending copy of data
chapter_listings_1  |
chapter_listings_1  |   4.5 - Point-free coding
chapter_listings_1  |     ✓ Count words/blocks in file as point-free
chapter_listings_1  |
chapter_listings_1  |   4.6 - Imperative to functional transformation
chapter_listings_1  |     ✓ Calculate balance in Wallet using FP
chapter_listings_1  |     ✓ Calculate balance in Wallet using FP with flatMap
chapter_listings_1  |     ✓ Calculate balance in Wallet using FP in point-free style
chapter_listings_1  |
chapter_listings_1  |   4.7 - Looking into the future
chapter_listings_1  |     ✓ Function binding
chapter_listings_1  |     ✓ Pipelining
chapter_listings_1  |
chapter_listings_1  |   4 - Introduction
chapter_listings_1  |     ✓ Demonstrates that JavaScript functions are objects too by printing its parent constructor
chapter_listings_1  |
chapter_listings_1  |   5.1.1 - Using containers for encapsulation and immutability
chapter_listings_1  |     ✓ Mapping functions on an array
chapter_listings_1  |     ✓ Implementing a “contextless” container by extending from Array
chapter_listings_1  |     ✓ Mapping validate over functions
chapter_listings_1  |
chapter_listings_1  |   5.1.2 - Contextual composition
chapter_listings_1  |     ✓ Uses compose in place of Id.map
chapter_listings_1  |
chapter_listings_1  |   5.1.3 - JavaScript data types
chapter_listings_1  |     ✓ Tests JS primitive types
chapter_listings_1  |
chapter_listings_1  |   5.2 - New Array APIs: {flat, flatMap}
chapter_listings_1  |     ✓ Intro
chapter_listings_1  |     ✓ 5.2.1 Array.prototype.flat
chapter_listings_1  |     ✓ 5.2.2 Array.prototype.flatMap
chapter_listings_1  |
chapter_listings_1  |   5.3 - The map/compose correspondence
chapter_listings_1  |     ✓ map
chapter_listings_1  |     ✓ flatMap
chapter_listings_1  |     ✓ flatMap with map
chapter_listings_1  |
chapter_listings_1  |   5.4 - Universal protocols
chapter_listings_1  |     ✓ 5.4.1 - Functors: identity and composition
chapter_listings_1  |     ✓ Functor mixin
chapter_listings_1  |     ✓ Monads: Left identity, Right identity, Associativity
chapter_listings_1  |     ✓ Monad mixin
chapter_listings_1  |     ✓ Id class with Functor mixin using bind operator
chapter_listings_1  |
chapter_listings_1  |   5.5 - Kinds of algebraic data types
chapter_listings_1  |     ✓ Records
chapter_listings_1  |     ✓ Validation using OLOO
chapter_listings_1  |
chapter_listings_1  |   5.6.4 - Higher-kinded composition with Validation
chapter_listings_1  | Block {
chapter_listings_1  |   index: 2,
chapter_listings_1  |   previousHash: '39118fa7156f824cbe5abecdd4b3c507c33c8aff578b4de68667b411c4de4570',
chapter_listings_1  |   data: [ 'some data' ],
chapter_listings_1  |   nonce: 0,
chapter_listings_1  |   difficulty: 0,
chapter_listings_1  |   timestamp: 1614915490136,
chapter_listings_1  |   hash: '536b860993b00586a0f9af08c384c688c122f45b0a9ba47bce0028fbb1cfe4cd'
chapter_listings_1  | }
chapter_listings_1  |     ✓ Shows isValid using flatMap
chapter_listings_1  |     ✓ Shows error handling
chapter_listings_1  |
chapter_listings_1  |   5.6.5 - 1.6.5   Point-free coding with ADTs
chapter_listings_1  | Block {
chapter_listings_1  |   index: 2,
chapter_listings_1  |   previousHash: '89f300a2ca89b9154d56bb0b27cb2fb7e5ff2d910fdcbbcda5a9e3a0dff77085',
chapter_listings_1  |   data: [ 'some data' ],
chapter_listings_1  |   nonce: 0,
chapter_listings_1  |   difficulty: 0,
chapter_listings_1  |   timestamp: 1614915490140,
chapter_listings_1  |   hash: 'b56a9da92cc21adb285027151da1b62e15657fb7bbfa934758bff94bf582c6ad'
chapter_listings_1  | }
chapter_listings_1  |     ✓ Shows isValid using composeM
chapter_listings_1  |
chapter_listings_1  |   5.6.6 - Validating complex data structures
chapter_listings_1  | Failure (Block out of order [previous (2) next (0)])
chapter_listings_1  |     ✓ Calls isValid recusively on the entire blockchain and its items
chapter_listings_1  |
chapter_listings_1  |   5.6.7 - Third party integration
chapter_listings_1  |     ✓ Using Ramda
chapter_listings_1  |     ✓ Using Validation with binding operator
chapter_listings_1  |
chapter_listings_1  |   5.6 - Implementing the Validation ADT
chapter_listings_1  |     ✓ 5.6.2 - Modeling success or failure
chapter_listings_1  |     ✓ Parent Validation class with Success and Failure subclasses
chapter_listings_1  | Block {
chapter_listings_1  |   index: 2,
chapter_listings_1  |   previousHash: 'a6626421cb7d9b68c5e8855fc4ba953b54bdfc3ab35b01b596da13a4f4b0c32e',
chapter_listings_1  |   data: [ 'some data' ],
chapter_listings_1  |   nonce: 0,
chapter_listings_1  |   difficulty: 0,
chapter_listings_1  |   timestamp: 1614915490147,
chapter_listings_1  |   hash: '25ce4d6c30714f34aaa6eb2dc574c66fed7ef7cddd80ee30cabe9a698f8acadc'
chapter_listings_1  | }
chapter_listings_1  |     ✓ Validating a block
chapter_listings_1  |     ✓ Validation#isFailure
chapter_listings_1  |
chapter_listings_1  |   5.7 - ADTs that help shape the future of JavaScript
chapter_listings_1  |     ✓ 5.7.1       Optional chaining
chapter_listings_1  |     ✓ Maybe/Result
chapter_listings_1  |     ✓ 5.7.2       Try and throw expressions
chapter_listings_1  |
chapter_listings_1  |   5 - Intro
chapter_listings_1  |     ✓ Mapping validation over array of functions
chapter_listings_1  |     ✓ Mapping validation over array of functions (failure)
chapter_listings_1  |
chapter_listings_1  |   6.2 -  Module patterns
chapter_listings_1  |     ✓ 1. Object namespaces
chapter_listings_1  |     ✓ 2. Immediately-Invoked Function Expressions (IIFEs)
chapter_listings_1  |     ✓ 3. IIFE mixins
chapter_listings_1  | Running Transfer 5 JSL from Luke to Ana
chapter_listings_1  | Running Transfer 2.5 JSL from Ana to Luke
chapter_listings_1  | Running Transfer 10 JSL from Ana to Matthew
chapter_listings_1  | Running Transfer 20 JSL from Matthew to Luke
chapter_listings_1  |     ✓ 4. Factory functions (structure only)
chapter_listings_1  |
chapter_listings_1  |   6.3 - Static vs Dynamic module system
chapter_listings_1  |     ✓ Tests different ways of importing
chapter_listings_1  |     ✓ Uses calculator module
chapter_listings_1  |
chapter_listings_1  |   6.4 - Out with the old and in with the new
chapter_listings_1  |     ✓ Path specifiers (single-valued import/export
chapter_listings_1  |     ✓ Multi-valued import/export
chapter_listings_1  |     ✓ Wildcard import
chapter_listings_1  |     ✓ Dynamic importing (option 1)
chapter_listings_1  |     ✓ Dynamic importing (option 2)
chapter_listings_1  |     ✓ Dynamic importing with query string params
chapter_listings_1  |
chapter_listings_1  |   6.5 - Import patterns
chapter_listings_1  |     ✓ Test proxy export
chapter_listings_1  |     ✓ Factory functions
chapter_listings_1  |     ✓ Builder functions
chapter_listings_1  |
chapter_listings_1  |   6.6.2 - Orthogonal Architecture
chapter_listings_1  |     ✓ takeSorted
chapter_listings_1  |     ✓ takeSorted (orthogonal)
chapter_listings_1  |
chapter_listings_1  |   7.1 - Using eval
chapter_listings_1  | 7
chapter_listings_1  |     ✓ Runs simple script using eval
chapter_listings_1  |
chapter_listings_1  |   7.3 - Symbol registries
chapter_listings_1  |     ✓ 7.3.1 Local symbol registry
chapter_listings_1  |     ✓ 7.3.2 Global symbol registry
chapter_listings_1  |
chapter_listings_1  |   7.4 - Practical applicaton of symbols
chapter_listings_1  |     ✓ 7.4 Using symbols to emulate private properties
chapter_listings_1  |
chapter_listings_1  |   7.5 - Well-known symbols
chapter_listings_1  | Collection(3) [ 'a', 'b', 'c' ]
chapter_listings_1  | Collection(2) [ 'A', 'B' ]
chapter_listings_1  |     ✓ 7.5.3 Symbol.species
chapter_listings_1  | Performing task...
chapter_listings_1  | Performing task...
chapter_listings_1  | Performing task...
blockchain_tests_1  |     ✓ Get fastest result (2005ms)
blockchain_tests_1  | JSON debug {
blockchain_tests_1  |   index: 1,
blockchain_tests_1  |   previousHash: '24c49b9805285e956e3929bc00e65bf1',
blockchain_tests_1  |   hash: '9c3f1db8a8649da50d33c69a658520b62db2c9368e9053891c8f5238567ef74c',
blockchain_tests_1  |   timestamp: 1614915490883,
blockchain_tests_1  |   difficulty: 2,
blockchain_tests_1  |   dataCount: 0,
blockchain_tests_1  |   data: [],
blockchain_tests_1  |   version: '1.0'
blockchain_tests_1  | }
chapter_listings_1  | Done.
chapter_listings_1  | Done.
chapter_listings_1  | Done.
chapter_listings_1  | Final result: BAR
chapter_listings_1  |     ✓ Validating promise (2002ms)
chapter_listings_1  | Performing task...
blockchain_tests_1  |     ✓ Promise.allSettled (2004ms)
blockchain_tests_1  | JSON debug {
blockchain_tests_1  |   index: 1,
blockchain_tests_1  |   previousHash: 'ce12e95d3c29c985685c5252e4cacb23',
blockchain_tests_1  |   hash: '1e331234c4c79f48055c2a7c7c8227240a2d0613e35a68f53518cab49dd9a366',
blockchain_tests_1  |   timestamp: 1614915492887,
blockchain_tests_1  |   difficulty: 1,
blockchain_tests_1  |   dataCount: 3,
blockchain_tests_1  |   data: [ '"a"', '"b"', '"c"' ],
blockchain_tests_1  |   version: '1.0'
blockchain_tests_1  | }
blockchain_tests_1  |     ✓ Promise.any with value (61ms)
blockchain_tests_1  | JSON debug {
blockchain_tests_1  |   index: 1,
blockchain_tests_1  |   previousHash: 'fe173e23a2b9955a74009a43cb08c24f',
blockchain_tests_1  |   hash: 'fbea356d8c6196d90a6a7d1d069f96cf9480e1359758173bcb6d06f2b29c0df8',
blockchain_tests_1  |   timestamp: 1614915492948,
blockchain_tests_1  |   difficulty: 2,
blockchain_tests_1  |   dataCount: 0,
blockchain_tests_1  |   data: [],
blockchain_tests_1  |   version: '1.0'
blockchain_tests_1  | }
blockchain_tests_1  | JSON debug {
blockchain_tests_1  |   index: 2,
blockchain_tests_1  |   previousHash: '040b0f651b720c3a6b7d3b65d11baa7b',
blockchain_tests_1  |   hash: '1236efac284431c8815204e4b45485e1836c1f5bb85fd9f1aa1466e0dd29db2c',
blockchain_tests_1  |   timestamp: 1614915492949,
blockchain_tests_1  |   difficulty: 2,
blockchain_tests_1  |   dataCount: 0,
blockchain_tests_1  |   data: [],
blockchain_tests_1  |   version: '1.0'
blockchain_tests_1  | }
blockchain_tests_1  | JSON debug {
blockchain_tests_1  |   index: 2,
blockchain_tests_1  |   previousHash: 'b9a3d752ec5ed44482be491b7ef3eed7',
blockchain_tests_1  |   hash: '25dc0b2beb203a19ac7cc2f8fad2aa69151d8b556a8528fd2ceb41addc214752',
blockchain_tests_1  |   timestamp: 1614915492950,
blockchain_tests_1  |   difficulty: 2,
blockchain_tests_1  |   dataCount: 0,
blockchain_tests_1  |   data: [],
blockchain_tests_1  |   version: '1.0'
blockchain_tests_1  | }
blockchain_tests_1  |     ✓ Async Iter (3 tasks) (84ms)
blockchain_tests_1  |
blockchain_tests_1  |   Has Hash Spec
blockchain_tests_1  |     ✓ Should compute a SHA256 cicpher
blockchain_tests_1  |     ✓ Hashes a simple object literal
blockchain_tests_1  |
blockchain_tests_1  |   Signature
blockchain_tests_1  | {
blockchain_tests_1  |   sender: { [Symbol(Symbol.toPrimitive)]: [Function: [Symbol.toPrimitive]] },
blockchain_tests_1  |   recipient: { [Symbol(Symbol.toPrimitive)]: [Function: [Symbol.toPrimitive]] },
blockchain_tests_1  |   sign: [Function: sign],
blockchain_tests_1  |   verifySignature: [Function: verifySignature]
blockchain_tests_1  | }
blockchain_tests_1  | [ERROR] Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) Number of attempts 0
blockchain_tests_1  | [ERROR] Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) Number of attempts 1
blockchain_tests_1  | [ERROR] Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) Number of attempts 2
blockchain_tests_1  | [ERROR] Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) Number of attempts 3
blockchain_tests_1  | [ERROR] Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) Number of exceeded 4!
blockchain_tests_1  |     ✓ Should return on verify after 3 attempts
blockchain_tests_1  |
blockchain_tests_1  |   Transaction
blockchain_tests_1  | Transaction Hash:  1cefbe7281ff5823147ecaa317c1b11dd0ec38594b9d641947925ca34241f600
blockchain_tests_1  | Transaction {
blockchain_tests_1  |   timestamp: 1614915493046,
blockchain_tests_1  |   nonce: 0,
blockchain_tests_1  |   id: '1cefbe7281ff5823147ecaa317c1b11dd0ec38594b9d641947925ca34241f600',
blockchain_tests_1  |   hash: '1cefbe7281ff5823147ecaa317c1b11dd0ec38594b9d641947925ca34241f600',
blockchain_tests_1  |   sender: 'sally',
blockchain_tests_1  |   recipient: 'luke',
blockchain_tests_1  |   funds: [₿0.1: null prototype] {
blockchain_tests_1  |     amount: 0.1,
blockchain_tests_1  |     currency: '₿',
blockchain_tests_1  |     equals: [Function: equals],
blockchain_tests_1  |     inspect: [Function: inspect],
blockchain_tests_1  |     serialize: [Function: serialize],
blockchain_tests_1  |     round: [Function: round],
blockchain_tests_1  |     minus: [Function: minus],
blockchain_tests_1  |     plus: [Function: plus],
blockchain_tests_1  |     times: [Function: times],
blockchain_tests_1  |     compareTo: [Function: compareTo],
blockchain_tests_1  |     asNegative: [Function: asNegative],
blockchain_tests_1  |     valueOf: [Function: valueOf],
blockchain_tests_1  |     toString: [Function: toString],
blockchain_tests_1  |     [Symbol(Symbol.toPrimitive)]: [Function: [Symbol.toPrimitive]],
blockchain_tests_1  |     [Symbol(Symbol.toStringTag)]: '₿0.1'
blockchain_tests_1  |   },
blockchain_tests_1  |   description: null,
blockchain_tests_1  |   signature: undefined
blockchain_tests_1  | }
blockchain_tests_1  | undefined
blockchain_tests_1  |     ✓ Should create a valid transaction
blockchain_tests_1  | Transaction Hash:  e374deb9cdf52263003dc73e6eef6757f14ce5abbcaffca1cdd6cba63ba43b84
blockchain_tests_1  | Transaction {
blockchain_tests_1  |   timestamp: 1614915493047,
blockchain_tests_1  |   nonce: 0,
blockchain_tests_1  |   id: 'e374deb9cdf52263003dc73e6eef6757f14ce5abbcaffca1cdd6cba63ba43b84',
blockchain_tests_1  |   hash: 'e374deb9cdf52263003dc73e6eef6757f14ce5abbcaffca1cdd6cba63ba43b84',
blockchain_tests_1  |   sender: 'sally',
blockchain_tests_1  |   recipient: 'luke',
blockchain_tests_1  |   funds: [₿0.1: null prototype] {
blockchain_tests_1  |     amount: 0.1,
blockchain_tests_1  |     currency: '₿',
blockchain_tests_1  |     equals: [Function: equals],
blockchain_tests_1  |     inspect: [Function: inspect],
blockchain_tests_1  |     serialize: [Function: serialize],
blockchain_tests_1  |     round: [Function: round],
blockchain_tests_1  |     minus: [Function: minus],
blockchain_tests_1  |     plus: [Function: plus],
blockchain_tests_1  |     times: [Function: times],
blockchain_tests_1  |     compareTo: [Function: compareTo],
blockchain_tests_1  |     asNegative: [Function: asNegative],
blockchain_tests_1  |     valueOf: [Function: valueOf],
blockchain_tests_1  |     toString: [Function: toString],
blockchain_tests_1  |     [Symbol(Symbol.toPrimitive)]: [Function: [Symbol.toPrimitive]],
blockchain_tests_1  |     [Symbol(Symbol.toStringTag)]: '₿0.1'
blockchain_tests_1  |   },
blockchain_tests_1  |   description: 'Test',
blockchain_tests_1  |   signature: undefined
blockchain_tests_1  | }
blockchain_tests_1  |     ✓ Should create a valid transaction using Builder pattern
blockchain_tests_1  |
blockchain_tests_1  |   Signature
blockchain_tests_1  |     ✓ Should Sign Data using a private key
blockchain_tests_1  |     ✓ Should sign transaction with null recipient
blockchain_tests_1  |
blockchain_tests_1  |   Key
blockchain_tests_1  |     ✓ Should use primitive value
blockchain_tests_1  |
blockchain_tests_1  |   Money Value Object
blockchain_tests_1  |     ✓ Should use primitive value
blockchain_tests_1  |     ✓ Should be frozen
blockchain_tests_1  | Print five dollars to the screen:
blockchain_tests_1  | USD5
blockchain_tests_1  |     ✓ Console log
blockchain_tests_1  |     ✓ Should prevent extension
blockchain_tests_1  |     ✓ Should prevent extension (delete)
blockchain_tests_1  |
blockchain_tests_1  |   Wallet
blockchain_tests_1  |     ✓ Should create a valid wallet with public and private keys
blockchain_tests_1  |
blockchain_tests_1  |   balanceOf Spec
blockchain_tests_1  |     ✓ Should verify the behavior of helper function balanceOf
blockchain_tests_1  |
blockchain_tests_1  |   compute_balance Spec
blockchain_tests_1  |     ✓ Should verify the behavior of helper function balanceOf
blockchain_tests_1  |
blockchain_tests_1  |   compute_balance2 Spec
blockchain_tests_1  |     ✓ Should verify the behavior of helper function balanceOf
blockchain_tests_1  |
blockchain_tests_1  |   compute_balance3 Spec
blockchain_tests_1  | compute_balance [₿-20: null prototype] {
blockchain_tests_1  |   amount: -20,
blockchain_tests_1  |   currency: '₿',
blockchain_tests_1  |   equals: [Function: equals],
blockchain_tests_1  |   inspect: [Function: inspect],
blockchain_tests_1  |   serialize: [Function: serialize],
blockchain_tests_1  |   round: [Function: round],
blockchain_tests_1  |   minus: [Function: minus],
blockchain_tests_1  |   plus: [Function: plus],
blockchain_tests_1  |   times: [Function: times],
blockchain_tests_1  |   compareTo: [Function: compareTo],
blockchain_tests_1  |   asNegative: [Function: asNegative],
blockchain_tests_1  |   valueOf: [Function: valueOf],
blockchain_tests_1  |   toString: [Function: toString],
blockchain_tests_1  |   [Symbol(Symbol.toPrimitive)]: [Function: [Symbol.toPrimitive]],
blockchain_tests_1  |   [Symbol(Symbol.toStringTag)]: '₿-20'
blockchain_tests_1  | }
blockchain_tests_1  |     ✓ Should verify the behavior of helper function balanceOf
blockchain_tests_1  |
blockchain_tests_1  |   compute_balance4 Spec
blockchain_tests_1  |     ✓ Should verify the behavior of helper function balanceOf
blockchain_tests_1  |
blockchain_tests_1  |   compute_balance5 Spec
blockchain_tests_1  |     ✓ Should verify the behavior of helper function balanceOf
blockchain_tests_1  |
blockchain_tests_1  |   compute_balance6 Spec
blockchain_tests_1  |     ✓ Should verify the behavior of helper function balanceOf
blockchain_tests_1  |
blockchain_tests_1  |   Language extensions test
blockchain_tests_1  |     ✓ Object.concat with null
blockchain_tests_1  | { name: 'Luis', print: [Function: print], log: [Function: log] }
blockchain_tests_1  | P name: Luis
blockchain_tests_1  | P2 name: Luis
blockchain_tests_1  |     ✓ Object.concat non-abstract
blockchain_tests_1  | [WARN] Collission found: print
blockchain_tests_1  | Printing in object with collission: Luis
blockchain_tests_1  |     ✓ Detects collissions
blockchain_tests_1  |     ✓ Mixins with classes
blockchain_tests_1  |
blockchain_tests_1  |   Combinators
blockchain_tests_1  |     ✓ Test monad composition
blockchain_tests_1  |     ✓ Test monad composition (rejection)
blockchain_tests_1  |     ✓ Test monad composition (rejection 2)
blockchain_tests_1  |
blockchain_tests_1  |   Conversions
blockchain_tests_1  | sym is [ Symbol(validation), Symbol(Symbol.toStringTag) ]
blockchain_tests_1  | sym is [ Symbol(validation), Symbol(Symbol.toStringTag) ]
blockchain_tests_1  |     ✓ Should convert from Maybe#Just to Validation#Succcess
blockchain_tests_1  | sym is [ Symbol(validation), Symbol(Symbol.toStringTag) ]
blockchain_tests_1  | sym is [ Symbol(validation), Symbol(Symbol.toStringTag) ]
blockchain_tests_1  |     ✓ Should convert from Maybe#Nothing to Validation#Failure
blockchain_tests_1  | sym is [ Symbol(maybe) ]
blockchain_tests_1  | sym is [ Symbol(maybe) ]
blockchain_tests_1  |     ✓ Should convert from Validation#Success to Maybe#Just
blockchain_tests_1  | sym is [ Symbol(maybe) ]
blockchain_tests_1  | sym is [ Symbol(maybe) ]
blockchain_tests_1  |     ✓ Should convert from Validation#Failure to Maybe#Nothing
blockchain_tests_1  |
blockchain_tests_1  |   Functor
blockchain_tests_1  |     ✓ Should bind to any container with a get
blockchain_tests_1  |
blockchain_tests_1  |   ID
blockchain_tests_1  |     ✓ Constructor
blockchain_tests_1  |     ✓ Id#map
blockchain_tests_1  |
blockchain_tests_1  |   Pair
blockchain_tests_1  |     ✓ Should destructure a pair of strings
blockchain_tests_1  |
blockchain_tests_1  |   Validation
blockchain_tests_1  |     ✓ Constructor
blockchain_tests_1  |     ✓ Validation#map
blockchain_tests_1  |     ✓ Validation#map (with strings)
blockchain_tests_1  |     ✓ Validation#toString
blockchain_tests_1  |     ✓ Validation#[Symbol.iterator]
blockchain_tests_1  |
blockchain_tests_1  |   Validation
blockchain_tests_1  |     ✓ fromNullable
blockchain_tests_1  |     ✓ of
blockchain_tests_1  |     ✓ real world: non-empty
blockchain_tests_1  |     ✓ real world: not exceeds and startsWithNumber
blockchain_tests_1  |     ✓ real world: not exceeds, startsWithNumber, with notEmpty
blockchain_tests_1  |
blockchain_tests_1  |   Validation#Failure
blockchain_tests_1  |     ✓ Type
blockchain_tests_1  |     ✓ Fold
blockchain_tests_1  |     ✓ Map
blockchain_tests_1  |     ✓ Apply
blockchain_tests_1  |     ✓ Bimap
blockchain_tests_1  |     ✓ Bifold
blockchain_tests_1  |
blockchain_tests_1  |   From Maybe To Validation
blockchain_tests_1  |     ✓ Maybe -> Validation
blockchain_tests_1  |     ✓ Validation -> Maybe
blockchain_tests_1  |
blockchain_tests_1  |   Validation#Sucess
blockchain_tests_1  |     ✓ Type
blockchain_tests_1  |     ✓ Identity
blockchain_tests_1  |     ✓ Fold
blockchain_tests_1  |     ✓ Map
blockchain_tests_1  |     ✓ Apply
blockchain_tests_1  |     ✓ Bimap
blockchain_tests_1  |     ✓ Bifold
blockchain_tests_1  |
blockchain_tests_1  |   Validation
blockchain_tests_1  |     ✓ Constructor
blockchain_tests_1  |     ✓ Validation#map
blockchain_tests_1  |     ✓ Validation#map (with strings)
blockchain_tests_1  |     ✓ Validation#ap
blockchain_tests_1  |     ✓ Validation#toString
blockchain_tests_1  |     ✓ Validation#[Symbol.iterator]
blockchain_tests_1  |
blockchain_tests_1  |   Natural transformation: List => Maybe
blockchain_tests_1  |     ✓ SafeHead
blockchain_tests_1  |
blockchain_tests_1  |   Natural Transformation: Maybe => Promise
blockchain_tests_1  | value2 hash 008672c1e9aa0a917a3eabf9b9e7ba25a0f8ed1c87d8039e05fb6a280d5230d1test
blockchain_tests_1  |     ✓ Make AJAX call when appropriate
blockchain_tests_1  |     ✓ Maybe with Promise under function composition
blockchain_tests_1  |
blockchain_tests_1  |   Combine Maybe with Validation
blockchain_tests_1  |     ✓ Add null validation through Maybe
blockchain_tests_1  |
blockchain_tests_1  |   Transfer Funds Test suite
blockchain_tests_1  | Found 1 pending transactions in block
blockchain_tests_1  | Cannot find module '/home/joj/src/blockchain/_babel/src/domain/service/bitcoinService/proof_of_work2.js' imported from /home/joj/src/blockchain/_babel/src/domain/service/BitcoinService.js
blockchain_tests_1  |     2) Should transfer funds from one wallet to the next
blockchain_tests_1  |
blockchain_tests_1  |   Transfer Funds Test suite
blockchain_tests_1  | Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) [TRACE] Calling:  then
blockchain_tests_1  | Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) [TRACE] Calling:  addPendingTransaction
blockchain_tests_1  | Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) [TRACE] Calling:  pendingTransactions
blockchain_tests_1  | Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) [TRACE] Calling:  height
blockchain_tests_1  | Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) [TRACE] Calling:  blocks
blockchain_tests_1  | Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) [TRACE] Calling:  top
blockchain_tests_1  | Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) [TRACE] Calling:  pendingTransactions
blockchain_tests_1  | Found 1 pending transactions in block
blockchain_tests_1  | Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) [TRACE] Calling:  validate
blockchain_tests_1  | Cannot find module '/home/joj/src/blockchain/_babel/src/domain/service/bitcoinService/proof_of_work2.js' imported from /home/joj/src/blockchain/_babel/src/domain/service/BitcoinService.js
blockchain_tests_1  | Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) [TRACE] Calling:  Symbol(Symbol.iterator)
blockchain_tests_1  | Fri Mar 05 2021 03:38:13 GMT+0000 (Coordinated Universal Time) [TRACE] Calling:  blocks
blockchain_tests_1  | Miner starts out with [₿0: null prototype] {
blockchain_tests_1  |   amount: 0,
blockchain_tests_1  |   currency: '₿',
blockchain_tests_1  |   equals: [Function: equals],
blockchain_tests_1  |   inspect: [Function: inspect],
blockchain_tests_1  |   serialize: [Function: serialize],
blockchain_tests_1  |   round: [Function: round],
blockchain_tests_1  |   minus: [Function: minus],
blockchain_tests_1  |   plus: [Function: plus],
blockchain_tests_1  |   times: [Function: times],
blockchain_tests_1  |   compareTo: [Function: compareTo],
blockchain_tests_1  |   asNegative: [Function: asNegative],
blockchain_tests_1  |   valueOf: [Function: valueOf],
blockchain_tests_1  |   toString: [Function: toString],
blockchain_tests_1  |   [Symbol(Symbol.toPrimitive)]: [Function: [Symbol.toPrimitive]],
blockchain_tests_1  |   [Symbol(Symbol.toStringTag)]: '₿0'
blockchain_tests_1  | }
blockchain_tests_1  |     3) Should transfer funds from one wallet to the next
blockchain_tests_1  |
blockchain_tests_1  |
blockchain_tests_1  |   102 passing (18s)
blockchain_tests_1  |   3 failing
blockchain_tests_1  |
blockchain_tests_1  |   1) Block Spec
blockchain_tests_1  |        Should validate block:
blockchain_tests_1  |      Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/joj/src/blockchain/_babel/src/domain/service/bitcoinService/proof_of_work2.js' imported from /home/joj/src/blockchain/_babel/src/domain/service/BitcoinService.js
blockchain_tests_1  |       at finalizeResolution (internal/modules/esm/resolve.js:284:11)
blockchain_tests_1  |       at moduleResolve (internal/modules/esm/resolve.js:662:10)
blockchain_tests_1  |       at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:752:11)
blockchain_tests_1  |       at Loader.resolve (internal/modules/esm/loader.js:97:40)
blockchain_tests_1  |       at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
blockchain_tests_1  |       at Loader.import (internal/modules/esm/loader.js:177:28)
blockchain_tests_1  |       at importModuleDynamically (internal/modules/esm/translators.js:55:26)
blockchain_tests_1  |       at exports.importModuleDynamicallyCallback (internal/process/esm_loader.js:27:14)
blockchain_tests_1  |       at BitcoinService.mineNewBlockIntoChain (file:///home/joj/src/blockchain/_babel/src/domain/service/BitcoinService.js:57:9)
blockchain_tests_1  |       at Context.<anonymous> (file:///home/joj/src/blockchain/_babel/src/domain/Block.spec.js:94:19)
blockchain_tests_1  |       at processImmediate (internal/timers.js:456:21)
blockchain_tests_1  |
blockchain_tests_1  |   2) Transfer Funds Test suite
blockchain_tests_1  |        Should transfer funds from one wallet to the next:
blockchain_tests_1  |      AssertionError: expected false to be truthy
blockchain_tests_1  |       at Context.<anonymous> (file:///home/joj/src/blockchain/_babel/test/SimpleTransfer.spec.js:39:12)
blockchain_tests_1  |       at processTicksAndRejections (internal/process/task_queues.js:97:5)
blockchain_tests_1  |
blockchain_tests_1  |   3) Transfer Funds Test suite
blockchain_tests_1  |        Should transfer funds from one wallet to the next:
blockchain_tests_1  |      AssertionError: expected false to be truthy
blockchain_tests_1  |       at Context.<anonymous> (file:///home/joj/src/blockchain/_babel/test/TransferFunds.spec.js:65:12)
blockchain_tests_1  |
blockchain_tests_1  |
blockchain_tests_1  |
joj-master_blockchain_tests_1 exited with code 0
chapter_listings_1  | Done.
chapter_listings_1  | Failure (Expected valid result, got: null)
chapter_listings_1  |     ✓ Extending native promise (Failure) (2003ms)
chapter_listings_1  | Start
chapter_listings_1  | 102
chapter_listings_1  |     ✓ Delayed promise (3001ms)
chapter_listings_1  |     ✓ @@toPrimitive
chapter_listings_1  |     ✓ @@toIterator
chapter_listings_1  |
chapter_listings_1  |   7.6 - Dynamic introspection and reflection
chapter_listings_1  | {
chapter_listings_1  |   username: '@luijar',
chapter_listings_1  |   password: 'Som3thingR@ndom',
chapter_listings_1  |   login: [Function: login]
chapter_listings_1  | }
chapter_listings_1  | 03/05/2021 [TRACE] Calling:  login
chapter_listings_1  | Logging in...
chapter_listings_1  | 03/05/2021 [TRACE] Calling:  username
chapter_listings_1  | 03/05/2021 [TRACE] Calling:  password
chapter_listings_1  | 03/05/2021 [TRACE] Calling:  password
chapter_listings_1  | 03/05/2021 [TRACE] Calling:  password
chapter_listings_1  | 03/05/2021 [TRACE] Calling:  password
chapter_listings_1  | 03/05/2021 [TRACE] Calling:  password
chapter_listings_1  | ••••••••
chapter_listings_1  |     ✓ 7.6.1 - Proxy
chapter_listings_1  |     ✓ Smart block
chapter_listings_1  |
chapter_listings_1  |   7.7 - Method decorators
chapter_listings_1  |     ✓ Validation decorator
chapter_listings_1  |
chapter_listings_1  |   8.2.2 - Are promises algebraic?
chapter_listings_1  |     ✓ Shows promise in pending status
chapter_listings_1  |     ✓ Shows identity
chapter_listings_1  |     ✓ Shows composition
chapter_listings_1  |     ✓ Shows chaining
chapter_listings_1  |
chapter_listings_1  |   8.2.3 - Fluent chaining
chapter_listings_1  |     ✓ Shows simple case
chapter_listings_1  |     ✓ Badly formed chain
chapter_listings_1  |     ✓ Shows error in chain
chapter_listings_1  |     ✓ Shows nested chain
chapter_listings_1  | (node:336) UnhandledPromiseRejectionWarning: Error: Nested Ooops!
chapter_listings_1  |     at file:///home/joj/src/chapter-listings/_babel/src/ch08/8-2-3.spec.mjs:48:9
chapter_listings_1  | (Use `node --trace-warnings ...` to show where the warning was created)
chapter_listings_1  | (node:336) 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)
chapter_listings_1  | (node:336) [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.
chapter_listings_1  |     ✓ Shows fixed chain
chapter_listings_1  | Catch inside: Inside Ooops!
chapter_listings_1  |     ✓ Shows trivial fix
chapter_listings_1  | Done
chapter_listings_1  |     ✓ Shows finally
chapter_listings_1  |
chapter_listings_1  |   8.2.4 - Promises in the wild
chapter_listings_1  |     ✓ Listing 8.2 Counting all blocks in file
chapter_listings_1  |     ✓ Listing 8.3 Mining a block in the chain
chapter_listings_1  |
chapter_listings_1  |   8.2 - JavaScript as promised
chapter_listings_1  |     ✓ Listing 8.1 Wrapping chain validation inside a promise
chapter_listings_1  |     ✓ Uses util.promisify
chapter_listings_1  |     ✓ Uses fs.promises
chapter_listings_1  |
chapter_listings_1  |   8.4 - Async made easy with async/await
chapter_listings_1  | Result is:  3
chapter_listings_1  |     ✓ countBlocksInFile using standard promises
chapter_listings_1  |     ✓ Listing 8.4 Uses async/await to count blocks in blocks.txt
chapter_listings_1  | extension name
chapter_listings_1  |     ✓ Pipe operator with async/await
chapter_listings_1  |
chapter_listings_1  |   8.5 - Async iteration
chapter_listings_1  |     ✓ Async calls out of order (500ms)
chapter_listings_1  |     ✓ Ordering async calls using reduce (500ms)
chapter_listings_1  |     ✓ Ordering async calls using for await ... const (502ms)
chapter_listings_1  | Result is:  3
chapter_listings_1  |     ✓ Listing 8.5 Count blocks in files of any size
chapter_listings_1  |     ✓ Async iterator (804ms)
chapter_listings_1  | Done
chapter_listings_1  |     ✓ Async iterator 2 (803ms)
chapter_listings_1  |
chapter_listings_1  |   9.1.3 - Examples
chapter_listings_1  |     ✓ Shows iterating through a blocks data
chapter_listings_1  |     ✓ Shows HasValidation on block
chapter_listings_1  |     ✓ Shows HasValidation on block with builder pattern
chapter_listings_1  |     ✓ Listing 9.1 Custom random iterator
chapter_listings_1  | 4994269671253260
chapter_listings_1  | 1077094682894328
chapter_listings_1  | 1762164555577084
chapter_listings_1  |     ✓ Iterable object
chapter_listings_1  |     ✓ Count words using iterator
chapter_listings_1  |
chapter_listings_1  |   9.2.2 - Creting iterable objects
chapter_listings_1  | Hash: ffbceb00ac4447ff9a60b7c5b730a63880719f013c6dd238f9d6d8137be409d3
chapter_listings_1  | Hash: 7737fdd30d5066efe97f97c62419cc2a65e2229ade8597f3598d1e23a178ebc9
chapter_listings_1  | Hash: 751b1cb1a3eb774bebc4e57c1f1aa419ad866a8481396e7fe7ac54eec25e0116
chapter_listings_1  | Hash: 36577105346f025d53ffafe4dbf81880bf2871fdac22f7387a23bca664ec0832
chapter_listings_1  | Hash: b3f65a997a2e15b5ff21dfd1c53c7312f8a02be85d39cd7c6f5735247e675a29
chapter_listings_1  | Hash: 2779bc1d0eea35cc3b8054d1bf53099c271a8036fa1b99950affa013d56bbd2d
chapter_listings_1  | Hash: 019c0ba9b726538be1fc947570c5bc74c1aa1c19372e11477c6c5c97ba28222a
chapter_listings_1  | Hash: 69b2a77c832e7c34676eff718815fc6fa4aa38de1437514fbbd3b49e5f2204fe
chapter_listings_1  | Hash: 4e9bb3e906dc53d6b05bbe7d2856d84bc4d121699301677ade3c20bc613c0884
chapter_listings_1  | Hash: 8ca33b16fefffe934b50f97d86ca4cb04d39a79d198b8bf552bf64e19ff3a7a7
chapter_listings_1  | Hash: ad96373fa4d24e0119525de78c84aaeeeb18a2568a08054f4844da0f12ebb681
chapter_listings_1  | Hash: 0b1b0994ec91f8f33e2dcb632eff7e8a3f8e0f7e55307f579efe9163f7cea585
chapter_listings_1  | Hash: d15f4b05d0faee75587f67280b6f86d59bc2040e4e59d166567154355b7c09d0
chapter_listings_1  | Hash: 8f16c2135a5840e3a37f70c201c9fa9137ddfe074cc663897706d3d3439d8428
chapter_listings_1  | Hash: 34dc6f98277bb3c1d56963090676129d290d2004246b083436da09896782a41a
chapter_listings_1  | Hash: 22472e8d1e415b4c359dbb12e72b3bb560136587c201160d57d98542fadadd56
chapter_listings_1  | Hash: 52debfa785ede2378bdbefa1c64e05143ffb31d34738473d0628957ca44124be
chapter_listings_1  | Hash: 32273d9f54f2d0be3ce62e514a72f58e3186f69cc16e38648adbc9777b74e13b
chapter_listings_1  | Hash: c0930bd1fbcd0a25db500a7e2bfb72ed3407453a3eaa6aa8229ae9db346d87af
chapter_listings_1  |     ✓ Listing 9.2 Custom generator function
chapter_listings_1  |
chapter_listings_1  |   9.2.3 - Async generators
chapter_listings_1  | Counting block 39e93efdc74d5a412ca7b9b7d12b6314e50fcec01a652276629caf8a93dc9c30
chapter_listings_1  | Counting block b2a70e3115760265c3152d3500ec38f941cbe476e0c954ab6975e2e916c21e91
chapter_listings_1  | Parsing block {"index":3,"previousHash":"b2a70e3115760265c3152d3500ec38f941cbe476e0c954ab6975e2e916c21e91","hash":"74d50aaa4932077337d379494e15ac12dde15f7158351f607a7604ffaf842b2b","data":[],"timestamp":1578058557333,"dataCount":0,"version":"1.0"}
chapter_listings_1  | Counting block 74d50aaa4932077337d379494e15ac12dde15f7158351f607a7604ffaf842b2b
chapter_listings_1  |     ✓ Listing 9.3 Async generator that sends blocks read from a file
chapter_listings_1  | BlockData is {
chapter_listings_1  |   index: 2,
chapter_listings_1  |   previousHash: '39e93efdc74d5a412ca7b9b7d12b6314e50fcec01a652276629caf8a93dc9c30',
chapter_listings_1  |   hash: 'b2a70e3115760265c3152d3500ec38f941cbe476e0c954ab6975e2e916c21e91',
chapter_listings_1  |   data: [],
chapter_listings_1  |   timestamp: 1578058557333,
chapter_listings_1  |   dataCount: 0,
chapter_listings_1  |   version: '1.0'
chapter_listings_1  | }
chapter_listings_1  | Parsing block {"index":3,"previousHash":"b2a70e3115760265c3152d3500ec38f941cbe476e0c954ab6975e2e916c21e91","hash":"74d50aaa4932077337d379494e15ac12dde15f7158351f607a7604ffaf842b2b","data":[],"timestamp":1578058557333,"dataCount":0,"version":"1.0"}
chapter_listings_1  | BlockData is {
chapter_listings_1  |   index: 3,
chapter_listings_1  |   previousHash: 'b2a70e3115760265c3152d3500ec38f941cbe476e0c954ab6975e2e916c21e91',
chapter_listings_1  |   hash: '74d50aaa4932077337d379494e15ac12dde15f7158351f607a7604ffaf842b2b',
chapter_listings_1  |   data: [],
chapter_listings_1  |   timestamp: 1578058557333,
chapter_listings_1  |   dataCount: 0,
chapter_listings_1  |   version: '1.0'
chapter_listings_1  | }
chapter_listings_1  |     ✓ Listing 9.4 Validate a stream of blocks generated from a file
chapter_listings_1  |
chapter_listings_1  |   9.2 - Generators
chapter_listings_1  |     ✓ Generator is a simple function
chapter_listings_1  |     ✓ Generator can also be a simple method
chapter_listings_1  | The
chapter_listings_1  | Joy
chapter_listings_1  | of
chapter_listings_1  | JavaScript!
chapter_listings_1  |     ✓ Generator yields words
chapter_listings_1  |     ✓ [Symbol.iterator] with Pair
chapter_listings_1  |     ✓ [Symbol.iterator] with Validation
chapter_listings_1  |     ✓ [Symbol.iterator] with Validation and default
chapter_listings_1  |
chapter_listings_1  |   9.3.1 - What is a stream
chapter_listings_1  |     ✓ Simple event emitter example
chapter_listings_1  |
chapter_listings_1  |   9.3.2 - Implementing a strea-able array
chapter_listings_1  |     ✓ PushArray example
chapter_listings_1  |
chapter_listings_1  |   9.4.1 - What is an observable
chapter_listings_1  |     ✓ Simple Observable example
chapter_listings_1  |
chapter_listings_1  |   9.4.3 - Creating custom observables
chapter_listings_1  |     ✓ Random number stream
chapter_listings_1  |     ✓ Combining map, filter, reduce, skip
chapter_listings_1  |
chapter_listings_1  |   9.4.4 - Building your own reactive toolkit
chapter_listings_1  | Observable with standalone operators:  14
chapter_listings_1  |     ✓ Map
chapter_listings_1  | Observable with composed, standalone operators:  29
chapter_listings_1  |     ✓ Composing map
chapter_listings_1  |
chapter_listings_1  |   9.4.5 - Observable mixin extension
chapter_listings_1  |     ✓ Combining map, filter, reduce
chapter_listings_1  |
chapter_listings_1  |   9.4.6 - Representing push streams using generators
chapter_listings_1  |     ✓ Listing 9.5 Construct observables from a generator
chapter_listings_1  | Parsing block {"index":3,"previousHash":"b2a70e3115760265c3152d3500ec38f941cbe476e0c954ab6975e2e916c21e91","hash":"74d50aaa4932077337d379494e15ac12dde15f7158351f607a7604ffaf842b2b","data":[],"timestamp":1578058557333,"dataCount":0,"version":"1.0"}
chapter_listings_1  | Valid blocks:  2
chapter_listings_1  | All blocks are valid!
chapter_listings_1  | Done validating block stream!
chapter_listings_1  |     ✓ Listing 9.6 Validate a stream of blocks using observables
chapter_listings_1  |     ✓ Shows error case in observer
chapter_listings_1  | THE
chapter_listings_1  | JOY
chapter_listings_1  | OF
chapter_listings_1  | Parsing block {"index":3,"previousHash":"b2a70e3115760265c3152d3500ec38f941cbe476e0c954ab6975e2e916c21e91","hash":"74d50aaa4932077337d379494e15ac12dde15f7158351f607a7604ffaf842b2b","data":[],"timestamp":1578058557333,"dataCount":0,"version":"1.0"}
chapter_listings_1  | Valid blocks:  2
chapter_listings_1  | All blocks are valid!
chapter_listings_1  | Done validating block stream!
chapter_listings_1  |     ✓ Using map with compose
chapter_listings_1  |
chapter_listings_1  |   9.4.7 - Pipeable operators
chapter_listings_1  |     ✓ Combining map, filter, reduce
chapter_listings_1  |     ✓ Piping with async example
chapter_listings_1  | In bind operator, value is 20
chapter_listings_1  |     ✓ Piping using bind operator
chapter_listings_1  |
chapter_listings_1  |   9.4.8 - Streamifying objects
chapter_listings_1  | Pair element:  20
chapter_listings_1  | Pair element:  30
chapter_listings_1  |     ✓ Make Pair streamable
chapter_listings_1  |     ✓ Listing 9.7 Streaming blocks in a blockchain
chapter_listings_1  |
chapter_listings_1  |   9.4.9 - Dynamic steamification
chapter_listings_1  | IN-STREAM
chapter_listings_1  |   Is even: 1
chapter_listings_1  |   Is even: 2
chapter_listings_1  |   Squaring: 2
chapter_listings_1  |   Received new value 4
chapter_listings_1  |   Is even: 3
chapter_listings_1  |   Is even: 4
chapter_listings_1  |   Squaring: 4
chapter_listings_1  |   Received new value 16
chapter_listings_1  |   Is even: 5
chapter_listings_1  |   IN-STREAM:push
chapter_listings_1  |     Emitting new value:  6
chapter_listings_1  |     Is even: 6
chapter_listings_1  |     Squaring: 6
chapter_listings_1  |     Received new value 36
chapter_listings_1  |     ✓ Creates a Reactive Array
chapter_listings_1  | IN-STREAM
chapter_listings_1  |   Reactive chain: Received block 7619b99280af38e76d2188bb88492bdd95ac8b406467db94f9f22a9a1aa38253
chapter_listings_1  |   Block is valid
chapter_listings_1  |   Pushing 1
chapter_listings_1  |   Top is 7619b99280af38e76d2188bb88492bdd95ac8b406467db94f9f22a9a1aa38253
chapter_listings_1  |   IN-STREAM:push
chapter_listings_1  |     Emitting new value:  Block {
chapter_listings_1  |       index: 1,
chapter_listings_1  |       previousHash: '7619b99280af38e76d2188bb88492bdd95ac8b406467db94f9f22a9a1aa38253',
chapter_listings_1  |       data: [],
chapter_listings_1  |       nonce: 0,
chapter_listings_1  |       difficulty: 0,
chapter_listings_1  |       timestamp: 1614915502396,
chapter_listings_1  |       hash: '3057a53f8c48bcb2c6bca59816ea5294e858e5b72288bd521b41af91525ba23c'
chapter_listings_1  |     }
chapter_listings_1  |     Reactive chain: Received block 3057a53f8c48bcb2c6bca59816ea5294e858e5b72288bd521b41af91525ba23c
chapter_listings_1  |     Block is invalid
chapter_listings_1  |   Top is 3057a53f8c48bcb2c6bca59816ea5294e858e5b72288bd521b41af91525ba23c
chapter_listings_1  |   Pushing 2
chapter_listings_1  |   IN-STREAM:push
chapter_listings_1  |     Emitting new value:  Block {
chapter_listings_1  |       index: -1,
chapter_listings_1  |       previousHash: '3057a53f8c48bcb2c6bca59816ea5294e858e5b72288bd521b41af91525ba23c',
chapter_listings_1  |       data: [],
chapter_listings_1  |       nonce: 0,
chapter_listings_1  |       difficulty: 0,
chapter_listings_1  |       timestamp: 1614915502398,
chapter_listings_1  |       hash: '5f9025dffc9fbeb81ca3ed3f5b37424a7cc3802e41fdecf7f203f0040cd14517'
chapter_listings_1  |     }
chapter_listings_1  |     Reactive chain: Received block 5f9025dffc9fbeb81ca3ed3f5b37424a7cc3802e41fdecf7f203f0040cd14517
chapter_listings_1  |     Block is invalid
chapter_listings_1  |   Asserting height
chapter_listings_1  |     ✓ Creates a Reactive Blockchain (10015ms)
chapter_listings_1  |
chapter_listings_1  |   Extending from Arrays
chapter_listings_1  |     ✓ Should extend from Array using classes
chapter_listings_1  |     ✓ Should extend from Array using classes (set species)
chapter_listings_1  |     ✓ Should extend from Array using prototype
chapter_listings_1  |     ✓ Should use structure typing (array-like) to behave like an array
chapter_listings_1  |
chapter_listings_1  |   Bind proposal
chapter_listings_1  |     ✓ prop
chapter_listings_1  |     ✓ map
chapter_listings_1  |     ✓ Money
chapter_listings_1  |     ✓ Extracts from Array
chapter_listings_1  |
chapter_listings_1  |   Calculate hash
chapter_listings_1  |     ✓ calculates a hash using composition
chapter_listings_1  |     ✓ calculates a hash using composition and recursion
chapter_listings_1  |
chapter_listings_1  |   Count words
chapter_listings_1  | Result is:  3
chapter_listings_1  |     ✓ compose2
chapter_listings_1  |     ✓ pipeline
chapter_listings_1  | Result is:  9
chapter_listings_1  |     ✓ Count blocks imperative
chapter_listings_1  | Result is:  9
chapter_listings_1  |     ✓ Count blocks using composition
chapter_listings_1  | Result is:  9
chapter_listings_1  |     ✓ Count blocks using compose2
chapter_listings_1  |
chapter_listings_1  |
chapter_listings_1  |   209 passing (20s)
chapter_listings_1  |   1 failing
chapter_listings_1  |
chapter_listings_1  |   1) 1.2 - Blockchain transfers
chapter_listings_1  |        Shows a few transfers:
chapter_listings_1  |      TypeError: Cannot read property 'pendingTransactions' of undefined
chapter_listings_1  |       at Context.<anonymous> (file:///home/joj/src/chapter-listings/_babel/src/ch01/1-2.spec.mjs:37:48)
chapter_listings_1  |       at processTicksAndRejections (internal/process/task_queues.js:97:5)
chapter_listings_1  |
chapter_listings_1  |
chapter_listings_1  |
joj-master_chapter_listings_1 exited with code 0
jimjones@DESKTOP-6HKRSMQ:~/Documents/joj-master$
luijar commented 3 years ago

Looking much better indeed! I just ran the entire sweet with all tests passing. I would have thought Docker would do a better job at abstracting the OS, but I guess there are few diffs from Windows and Mac. This was the whole point for me using Docker that it would "run the same way" for all