@testing-library/svelte 4.2.2 → 5.0.0

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": "@testing-library/svelte",
3
- "version": "4.2.2",
3
+ "version": "5.0.0",
4
4
  "description": "Simple and complete Svelte testing utilities that encourage good testing practices.",
5
5
  "main": "src/index.js",
6
6
  "exports": {
@@ -93,7 +93,7 @@
93
93
  "eslint-plugin-svelte": "2.35.1",
94
94
  "eslint-plugin-vitest-globals": "1.4.0",
95
95
  "expect-type": "^0.17.3",
96
- "happy-dom": "^13.3.1",
96
+ "happy-dom": "^14.7.1",
97
97
  "jsdom": "^22.1.0",
98
98
  "npm-run-all": "^4.1.5",
99
99
  "prettier": "3.2.4",
@@ -2,9 +2,8 @@ import { render } from '@testing-library/svelte'
2
2
  import { expect, test } from 'vitest'
3
3
 
4
4
  import Comp from './fixtures/Context.svelte'
5
- import { IS_HAPPYDOM, IS_SVELTE_5 } from './utils.js'
6
5
 
7
- test.skipIf(IS_SVELTE_5 && IS_HAPPYDOM)('can set a context', () => {
6
+ test('can set a context', () => {
8
7
  const message = 'Got it'
9
8
 
10
9
  const { getByText } = render(Comp, {
@@ -2,13 +2,12 @@ import { act, render, screen } from '@testing-library/svelte'
2
2
  import { describe, expect, test, vi } from 'vitest'
3
3
 
4
4
  import Mounter from './fixtures/Mounter.svelte'
5
- import { IS_HAPPYDOM, IS_SVELTE_5 } from './utils.js'
6
5
 
7
6
  const onMounted = vi.fn()
8
7
  const onDestroyed = vi.fn()
9
8
  const renderSubject = () => render(Mounter, { onMounted, onDestroyed })
10
9
 
11
- describe.skipIf(IS_SVELTE_5 && IS_HAPPYDOM)('mount and destroy', () => {
10
+ describe('mount and destroy', () => {
12
11
  test('component is mounted', async () => {
13
12
  renderSubject()
14
13
 
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable import/export */
2
- import { act, cleanup } from './svelte5.js'
2
+ import { act } from './pure.js'
3
+ import { cleanup } from './svelte5.js'
3
4
 
4
5
  // If we're running in a test runner that supports afterEach
5
6
  // then we'll automatically run cleanup afterEach test