Skip to content

Commit

Permalink
Merge pull request #121 from hyperaudio/refactor-strategy
Browse files Browse the repository at this point in the history
Refactor of main library using the strategy pattern
  • Loading branch information
maboa authored Sep 8, 2022
2 parents 76edf74 + 9fb1b83 commit fcb0853
Show file tree
Hide file tree
Showing 2 changed files with 151 additions and 129 deletions.
9 changes: 6 additions & 3 deletions __TEST__/hyperaudio-lite.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @jest-environment jsdom
*
* Tests updated for version 2.0.8
* Tests updated for version 2.1.7
*/

const { test } = require("@jest/globals");
Expand Down Expand Up @@ -153,7 +153,10 @@ test("instantiation - webMonetization true", () => {

test("media playback - payment pointer inserted", () => {
simulateClick(document.getElementsByTagName("span")[4], "click");
const paymentPointer = document.querySelector('[name="monetization"]');

expect(paymentPointer.content).toStrictEqual("payment-pointer");
jest.setTimeout(() => {
const paymentPointer = document.querySelector('[name="monetization"]');
expect(paymentPointer.content).toStrictEqual("payment-pointer");
}, 0)

});
Loading

0 comments on commit fcb0853

Please sign in to comment.