Skip to content

Instantly share code, notes, and snippets.

@ahirschberg
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save ahirschberg/cb65614e1d7fd401ebdc to your computer and use it in GitHub Desktop.

Select an option

Save ahirschberg/cb65614e1d7fd401ebdc to your computer and use it in GitHub Desktop.
Excerpt from the BookPlayerPageGenerator tests
it('updates chapter position property to match audio player position', function () {
bppg.generatePage({book: BOOK_OBJECT, chapter: chapterObjInstance});
chapterObjInstance.position = -1 // set the position to a nonzero value
var dom_ele = $('#audioSource').trigger('timeupdate');
expect(chapterObjInstance.position).equal(0);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment