| 52 | }; |
| 53 | |
| 54 | const getSample = () => { |
| 55 | const config = { |
| 56 | SLACK_SECRET: SLACK_SECRET, |
| 57 | KG_API_KEY: KG_API_KEY, |
| 58 | }; |
| 59 | const kgsearch = { |
| 60 | entities: { |
| 61 | search: sinon.stub().resolves(), |
| 62 | }, |
| 63 | }; |
| 64 | const googleapis = { |
| 65 | kgsearch: sinon.stub().returns(kgsearch), |
| 66 | }; |
| 67 | |
| 68 | return { |
| 69 | program: proxyquire('../', { |
| 70 | '@googleapis/kgsearch': googleapis, |
| 71 | process: {env: config}, |
| 72 | }), |
| 73 | mocks: { |
| 74 | googleapis: googleapis, |
| 75 | kgsearch: kgsearch, |
| 76 | config: config, |
| 77 | }, |
| 78 | }; |
| 79 | }; |
| 80 | |
| 81 | const getMocks = () => { |
| 82 | const req = { |