Skip to content

Commit 0de8fe6

Browse files
authored
Merge pull request #25 from pendo-io/jg-fix-unit-tests
Clean up reference to jest and replace with vi (vitest)
2 parents 5a0cb20 + fe4bc60 commit 0de8fe6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/rrdom/test/diff.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1831,13 +1831,13 @@ describe('diff algorithm for rrdom', () => {
18311831

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

1838-
jest
1839-
.spyOn(window, 'CSSStyleSheet')
1840-
.mockImplementationOnce(MockCSSStyleSheet as any);
1838+
vi.spyOn(window, 'CSSStyleSheet').mockImplementationOnce(
1839+
MockCSSStyleSheet as any,
1840+
);
18411841

18421842
const baseStyle = 'body {margin: 0;}';
18431843
const insertedStyle = 'div {display: flex;}';

0 commit comments

Comments
 (0)