piral-lazy 1.3.3-beta.6190 → 1.3.3-beta.6204

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-lazy",
3
- "version": "1.3.3-beta.6190",
3
+ "version": "1.3.3-beta.6204",
4
4
  "description": "Plugin for lazy loading third-party framework components in Piral.",
5
5
  "keywords": [
6
6
  "piral",
@@ -61,8 +61,8 @@
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/react": "^18.0.0",
64
- "piral-core": "1.3.3-beta.6190",
64
+ "piral-core": "1.3.3-beta.6204",
65
65
  "react": "^18.0.0"
66
66
  },
67
- "gitHead": "dc3358f0e08b06acea2056b612f268334a8c49c8"
67
+ "gitHead": "8a1fa7b847b0e146a5bdb8e0497c436fffe4fd4d"
68
68
  }
@@ -1,5 +1,9 @@
1
+ /**
2
+ * @vitest-environment jsdom
3
+ */
1
4
  import * as React from 'react';
2
5
  import create from 'zustand';
6
+ import { describe, it, expect, vitest } from 'vitest';
3
7
  import { render, act } from '@testing-library/react';
4
8
  import { StateContext } from 'piral-core';
5
9
  import { createLazyApi } from './create';
@@ -18,9 +22,9 @@ function createMockContainer() {
18
22
  }));
19
23
  return {
20
24
  context: {
21
- on: jest.fn(),
22
- off: jest.fn(),
23
- emit: jest.fn(),
25
+ on: vitest.fn(),
26
+ off: vitest.fn(),
27
+ emit: vitest.fn(),
24
28
  defineActions() {},
25
29
  state,
26
30
  converters: {
@@ -47,7 +51,7 @@ function createMockContainer() {
47
51
 
48
52
  describe('Piral-Lazy create module', () => {
49
53
  it('appends lazy loading for a DOM component', async () => {
50
- const mount = jest.fn();
54
+ const mount = vitest.fn();
51
55
  const MyComponent = { component: { mount }, type: 'html' };
52
56
  const load = async () => await Promise.resolve(MyComponent);
53
57
  const { context, api } = createMockContainer();