Test whether callback is called with correct parameter

This commit is contained in:
Philipp Czora
2019-01-23 10:48:31 +01:00
parent 2494daebd4
commit f92d692584

View File

@@ -446,11 +446,13 @@ describe("repos fetch", () => {
}
});
fetchMock.getOnce(REPOS_URL + "/slarti/fjords", slartiFjords);
let callMe = "not yet";
const callback = () => {
const callback = (r: any) => {
expect(r).toEqual(slartiFjords);
callMe = "yeah";
};