Skip to content

Commit

Permalink
test: fix XMLSerializer mock
Browse files Browse the repository at this point in the history
  • Loading branch information
cwillisf committed Mar 14, 2024
1 parent f1438f7 commit f7ca856
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/unit/util/themes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ describe('themes', () => {
beforeEach(() => {
serializeToString = jest.fn(() => 'mocked xml');

global.XMLSerializer = () => ({
serializeToString
});
class XMLSerializer {
constructor () {
this.serializeToString = serializeToString;
}
}

global.XMLSerializer = XMLSerializer;
});

test('updates extension block colors based on theme', () => {
Expand Down

0 comments on commit f7ca856

Please sign in to comment.