Skip to content

Commit

Permalink
Merge pull request #25 from pendo-io/jg-fix-unit-tests
Browse files Browse the repository at this point in the history
Clean up reference to jest and replace with vi (vitest)
  • Loading branch information
jaj1014 authored Oct 21, 2024
2 parents 5a0cb20 + fe4bc60 commit 0de8fe6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/rrdom/test/diff.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1831,13 +1831,13 @@ describe('diff algorithm for rrdom', () => {

it('should not drop inserted styles when moving a style element with inserted styles', async () => {
function MockCSSStyleSheet() {
this.replaceSync = jest.fn();
this.replaceSync = vi.fn();
this.cssRules = [{ cssText: baseStyle }];
}

jest
.spyOn(window, 'CSSStyleSheet')
.mockImplementationOnce(MockCSSStyleSheet as any);
vi.spyOn(window, 'CSSStyleSheet').mockImplementationOnce(
MockCSSStyleSheet as any,
);

const baseStyle = 'body {margin: 0;}';
const insertedStyle = 'div {display: flex;}';
Expand Down

0 comments on commit 0de8fe6

Please sign in to comment.