Skip to content

Commit

Permalink
wtfnode
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus23 committed May 26, 2021
1 parent eab6bc8 commit 5cbfd03
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
12 changes: 12 additions & 0 deletions tests/fs/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
})


Expand Down
3 changes: 3 additions & 0 deletions tests/helpers/in-memory-ipfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ export async function createInMemoryIPFS(): Promise<IPFS> {
return await Ipfs.create({
offline: true,
silent: true,
preload: {
enabled: false,
},
config: {
Addresses: {
Swarm: []
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5cbfd03

Please sign in to comment.