Skip to content

Instantly share code, notes, and snippets.

@dvallin
Created November 29, 2017 16:46
Show Gist options
  • Save dvallin/108d4afa63c64cdaef3bf1ae1fe7c507 to your computer and use it in GitHub Desktop.
Save dvallin/108d4afa63c64cdaef3bf1ae1fe7c507 to your computer and use it in GitHub Desktop.
const taskA = new Task("id", "taskA");
const taskB = new Task("id", "taskB");
getters.tasksOrderedByTitle = jest.fn().mockReturnValueOnce([taskA, taskB]);
expect(getters.lowestTitle({}, getters)).toEqual(taskA);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment