-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinputs.ts
More file actions
18 lines (14 loc) · 772 Bytes
/
Copy pathinputs.ts
File metadata and controls
18 lines (14 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { Client } from "./client";
import { scenes, parseScene } from "./fixtures";
const parsedScenes = Object.keys(scenes).flatMap(
key => parseScene(scenes[key])
);
const fetchCommitment = parsedScenes.flatMap(args => args.commitment);
const fetchCommitments = parsedScenes.flatMap(args => args.commitments);
const fetchCitation = parsedScenes.flatMap(args => args.citations);
const mocks = {
fetchCommitment: fetchCommitment.map(params => ({ endpoint: Client.prototype.fetchCommitment, params: params})),
fetchCommitments: fetchCommitments.map(params => ({ endpoint: Client.prototype.fetchCommitments, params: params})),
fetchCitation: fetchCitation.map(params => ({ endpoint: Client.prototype.fetchCitation, params: params})),
};
export default mocks;