fixing tests

This commit is contained in:
voxmatt
2017-03-09 17:22:18 -08:00
parent 3186a2ba27
commit 4cc74c831a
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -151,7 +151,7 @@ declare module "react-relay" {
pendingVariables?: any;
setVariables(variables: Object, onReadyStateChange?: OnReadyStateChange): void;
forceFetch(variables: Object, onReadyStateChange?: OnReadyStateChange): void;
hasOptimisticUpdate(record: any): boolean;
getPendingTransactions(record: any): RelayMutationTransaction[];
hasOptimisticUpdate(record?: any): boolean;
getPendingTransactions(record?: any): RelayMutationTransaction[];
}
}
+6
View File
@@ -74,10 +74,16 @@ class StubbedArtwork extends React.Component<null, null> {
const props = {
artwork: { title: "CHAMPAGNE FORMICA FLAG" },
relay: {
route: {
name: "champagne"
},
variables: {
artworkID: "champagne-formica-flag",
},
setVariables: () => {},
forceFetch: () => {},
hasOptimisticUpdate: () => false,
getPendingTransactions: (): Relay.RelayMutationTransaction[] => undefined,
}
}
return <ArtworkContainer {...props} />