| … | … | @@ -12,7 +12,7 @@ import Corestore from 'corestore' |
| 12 | 12 | import { Feed } from 'favela-peer/lib/feed-base.js' |
| 13 | 13 | import { RecordStore } from 'favela-peer/lib/record-store.js' |
| 14 | 14 | import { FavelaFeed } from '../lib/favela-feed.js' |
| 15 | | import { attest } from 'favela-peer/test/helpers.js' |
| 15 | import { attest, identity } from 'favela-peer/test/helpers.js' |
| 16 | 16 | |
| 17 | 17 | const tmp = () => fs.mkdtempSync(join(os.tmpdir(), 'holder-')) |
| 18 | 18 | |
| … | … | @@ -168,7 +168,10 @@ test('⛔⛔ a knock on a held feed does not strand the bridge behind the owner' |
| 168 | 168 | const unpipeStranger = pipe(owner, ownerOnStranger) |
| 169 | 169 | |
| 170 | 170 | await until(async () => { await ownerOnStranger.update(); return (await ownerOnStranger.devices()).length > 0 }, { timeout: 10000 }) |
| 171 | | await ownerOnStranger.knock(stranger.key) |
| 171 | // A knock proves which identity is knocking (favela-peer feed.js applyKnock): the stranger's device |
| 172 | // binds the writer core it knocks through. |
| 173 | const strangerDevice = await (await identity()).device() |
| 174 | await ownerOnStranger.knock(stranger.key, (writerKeyHex) => strangerDevice.bind(writerKeyHex)) |
| 172 | 175 | t.ok(await until(async () => { await owner.update(); return (await owner.knocks()).length }, { timeout: 10000 }), |
| 173 | 176 | 'setup: the stranger\'s knock landed in the owner\'s feed') |
| 174 | 177 | |