From 5cbfd038ced869c5017de1f0cfddc784d8a6a69c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Wed, 26 May 2021 18:33:03 +0200 Subject: [PATCH] wtfnode --- package.json | 1 + tests/fs/integration.test.ts | 12 ++++++++++++ tests/helpers/in-memory-ipfs.ts | 3 +++ yarn.lock | 5 +++++ 4 files changed, 21 insertions(+) diff --git a/package.json b/package.json index b1db0649d..27cb955b6 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,7 @@ "typedoc": "^0.20.23", "typescript": "^4.1.3", "typescript-documentation": "^2.0.0", + "wtfnode": "^0.8.4", "yarn": "^1.22.4" }, "dependencies": { diff --git a/tests/fs/integration.test.ts b/tests/fs/integration.test.ts index 8f6e48414..265ee1ade 100644 --- a/tests/fs/integration.test.ts +++ b/tests/fs/integration.test.ts @@ -10,6 +10,8 @@ import * as path from '../../src/path' import * as identifiers from '../../src/common/identifiers' import * as crypto from '../../src/crypto' +import wtf from 'wtfnode' + let ipfs: IPFS | null = null @@ -25,6 +27,16 @@ afterAll(async () => { // close some file handles or smth, which // causes jest to finish properly ipfs = null + let stuff = "" + wtf.setLogger("info", (msg: string) => { + stuff += msg + stuff += "\n" + }) + const msgs = await new Promise(resolve => setTimeout(() => { + wtf.dump() + resolve(stuff) + }, 2000)) + console.log(msgs) }) diff --git a/tests/helpers/in-memory-ipfs.ts b/tests/helpers/in-memory-ipfs.ts index 70c410b50..9ac24778b 100644 --- a/tests/helpers/in-memory-ipfs.ts +++ b/tests/helpers/in-memory-ipfs.ts @@ -6,6 +6,9 @@ export async function createInMemoryIPFS(): Promise { return await Ipfs.create({ offline: true, silent: true, + preload: { + enabled: false, + }, config: { Addresses: { Swarm: [] diff --git a/yarn.lock b/yarn.lock index 94cc4114b..4b36195a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9701,6 +9701,11 @@ ws@^7.3.1, ws@~7.4.2: resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.5.tgz#a484dd851e9beb6fdb420027e3885e8ce48986c1" integrity sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g== +wtfnode@^0.8.4: + version "0.8.4" + resolved "https://registry.yarnpkg.com/wtfnode/-/wtfnode-0.8.4.tgz#91ecf78a40ce222a73a063f26d72bea52357efcc" + integrity sha512-64GEKtMt/MUBuAm+8kHqP74ojjafzu00aT0JKsmkIwYmjRQ/odO0yhbzKLm+Z9v1gMla+8dwITRKzTAlHsB+Og== + xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz"