forked from Kieran/snort
31 lines
750 B
TypeScript
31 lines
750 B
TypeScript
|
import { splitAllByWriteRelays } from "../src/GossipModel"
|
||
|
|
||
|
describe("GossipModel", () => {
|
||
|
it("should not output empty", () => {
|
||
|
const Relays = {
|
||
|
get: (pk?: string) => {
|
||
|
return [];
|
||
|
}
|
||
|
}
|
||
|
const a = [{
|
||
|
"until": 1686651693,
|
||
|
"limit": 200,
|
||
|
"kinds": [
|
||
|
1,
|
||
|
6,
|
||
|
6969
|
||
|
],
|
||
|
"authors": [
|
||
|
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
|
||
|
]
|
||
|
}];
|
||
|
|
||
|
const output = splitAllByWriteRelays(Relays, a);
|
||
|
expect(output).toEqual([
|
||
|
{
|
||
|
relay: "",
|
||
|
filters: a
|
||
|
}
|
||
|
])
|
||
|
})
|
||
|
})
|