Skip to content

Commit 1be6f67

Browse files
committed
fixup: deepClone from vitest
1 parent fd05580 commit 1be6f67

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/__tests__/vite-plugin.test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { beforeEach, describe, expect, test, vi } from 'vitest'
1+
import { beforeEach, deepClone, describe, expect, test, vi } from 'vitest'
22

33
import { svelteTesting } from '../vite.js'
44
import { IS_JEST } from './utils.js'
@@ -45,7 +45,7 @@ describe.skipIf(IS_JEST)('vite plugin', () => {
4545
'adds browser condition if necessary',
4646
({ config, expectedConditions }) => {
4747
const subject = svelteTesting()
48-
const viteConfig = structuredClone(config)
48+
const viteConfig = deepClone(config)
4949

5050
subject.config(viteConfig)
5151

@@ -74,7 +74,7 @@ describe.skipIf(IS_JEST)('vite plugin', () => {
7474
'skips browser condition if possible',
7575
({ config, expectedConditions }) => {
7676
const subject = svelteTesting()
77-
const viteConfig = structuredClone(config)
77+
const viteConfig = deepClone(config)
7878

7979
subject.config(viteConfig)
8080

@@ -104,7 +104,7 @@ describe.skipIf(IS_JEST)('vite plugin', () => {
104104
},
105105
])('adds cleanup', ({ config, expectedSetupFiles }) => {
106106
const subject = svelteTesting()
107-
const viteConfig = structuredClone(config)
107+
const viteConfig = deepClone(config)
108108

109109
subject.config(viteConfig)
110110

@@ -134,7 +134,7 @@ describe.skipIf(IS_JEST)('vite plugin', () => {
134134
},
135135
])('adds noExternal rule', ({ config, expectedNoExternal }) => {
136136
const subject = svelteTesting()
137-
const viteConfig = structuredClone(config)
137+
const viteConfig = deepClone(config)
138138

139139
subject.config(viteConfig)
140140

@@ -160,7 +160,7 @@ describe.skipIf(IS_JEST)('vite plugin', () => {
160160
},
161161
])('skips noExternal if able', ({ config, expectedNoExternal }) => {
162162
const subject = svelteTesting()
163-
const viteConfig = structuredClone(config)
163+
const viteConfig = deepClone(config)
164164

165165
subject.config(viteConfig)
166166

@@ -173,7 +173,7 @@ describe.skipIf(IS_JEST)('vite plugin', () => {
173173

174174
test('bails on noExternal if input is unexpected', () => {
175175
const subject = svelteTesting()
176-
const viteConfig = structuredClone({ ssr: { noExternal: false } })
176+
const viteConfig = deepClone({ ssr: { noExternal: false } })
177177

178178
subject.config(viteConfig)
179179

0 commit comments

Comments
 (0)