1
- export interface JSDOMOptions {
1
+ import type { jsdomTypes } from 'vitest/optional-types.js'
2
+
3
+ export type JSDOMOptions = ConstructorOptionsOverride & Omit < jsdomTypes . ConstructorOptions , keyof ConstructorOptionsOverride >
4
+
5
+ interface ConstructorOptionsOverride {
2
6
/**
3
7
* The html content for the test.
4
8
*
5
9
* @default '<!DOCTYPE html>'
6
10
*/
7
11
html ?: string | ArrayBufferLike
8
- /**
9
- * referrer just affects the value read from document.referrer.
10
- * It defaults to no referrer (which reflects as the empty string).
11
- */
12
- referrer ?: string
13
12
/**
14
13
* userAgent affects the value read from navigator.userAgent, as well as the User-Agent header sent while fetching subresources.
15
14
*
@@ -24,21 +23,6 @@ export interface JSDOMOptions {
24
23
* @default 'http://localhost:3000'.
25
24
*/
26
25
url ?: string
27
- /**
28
- * contentType affects the value read from document.contentType, and how the document is parsed: as HTML or as XML.
29
- * Values that are not "text/html" or an XML mime type will throw.
30
- *
31
- * @default 'text/html'.
32
- */
33
- contentType ?: string
34
- /**
35
- * The maximum size in code units for the separate storage areas used by localStorage and sessionStorage.
36
- * Attempts to store data larger than this limit will cause a DOMException to be thrown. By default, it is set
37
- * to 5,000,000 code units per origin, as inspired by the HTML specification.
38
- *
39
- * @default 5_000_000
40
- */
41
- storageQuota ?: number
42
26
/**
43
27
* Enable console?
44
28
*
@@ -55,20 +39,6 @@ export interface JSDOMOptions {
55
39
* @default true
56
40
*/
57
41
pretendToBeVisual ?: boolean
58
- /**
59
- * `includeNodeLocations` preserves the location info produced by the HTML parser,
60
- * allowing you to retrieve it with the nodeLocation() method (described below).
61
- *
62
- * It defaults to false to give the best performance,
63
- * and cannot be used with an XML content type since our XML parser does not support location info.
64
- *
65
- * @default false
66
- */
67
- includeNodeLocations ?: boolean | undefined
68
- /**
69
- * @default 'dangerously'
70
- */
71
- runScripts ?: 'dangerously' | 'outside-only'
72
42
/**
73
43
* Enable CookieJar
74
44
*
0 commit comments