mirror of
https://github.com/Permissionless-Software-Foundation/psf-memo-client.git
synced 2026-09-21 16:52:02 -07:00
Extract shared test helpers for the Memo post and Set Name behavior slices: fake wallet/profiles, MemoAction tests, page-controller tests, page build wiring, and shared property-test invariants. Behavior is preserved; all unit, property, and acceptance tests pass. By refactorer.
14 lines
291 B
JavaScript
14 lines
291 B
JavaScript
'use strict'
|
|
|
|
// A fake profile store that records names set for addresses.
|
|
function fakeProfiles () {
|
|
const names = new Map()
|
|
return {
|
|
names,
|
|
setName: (addr, name) => names.set(addr, name),
|
|
getName: (addr) => names.get(addr) || null
|
|
}
|
|
}
|
|
|
|
module.exports = { fakeProfiles }
|