@@ -7,13 +7,32 @@ exports[`valueInjectionLoader > should correctly insert values for basic config
7
7
"
8
8
` ;
9
9
10
+ exports [` valueInjectionLoader > should correctly insert values for basic config 2` ] = `
11
+ "
12
+ ;globalThis["foo"] = "bar";import * as Sentry from '@sentry/nextjs';
13
+ Sentry.init();
14
+ "
15
+ ` ;
16
+
10
17
exports [` valueInjectionLoader > should correctly insert values with a misplaced directive 1` ] = `
11
18
"
12
19
;globalThis["foo"] = "bar";console.log('This will render the directive useless');
13
20
"use client";
14
21
15
22
16
23
24
+ import * as Sentry from '@sentry/nextjs';
25
+ Sentry.init();
26
+ "
27
+ ` ;
28
+
29
+ exports [` valueInjectionLoader > should correctly insert values with a misplaced directive 2` ] = `
30
+ "
31
+ ;globalThis["foo"] = "bar";console.log('This will render the directive useless');
32
+ "use client";
33
+
34
+
35
+
17
36
import * as Sentry from '@sentry/nextjs';
18
37
Sentry.init();
19
38
"
@@ -27,6 +46,14 @@ exports[`valueInjectionLoader > should correctly insert values with directive 1`
27
46
"
28
47
` ;
29
48
49
+ exports [` valueInjectionLoader > should correctly insert values with directive 2` ] = `
50
+ "
51
+ "use client";globalThis["foo"] = "bar";
52
+ import * as Sentry from '@sentry/nextjs';
53
+ Sentry.init();
54
+ "
55
+ ` ;
56
+
30
57
exports [` valueInjectionLoader > should correctly insert values with directive and block comments 1` ] = `
31
58
"
32
59
/* test */
@@ -36,6 +63,15 @@ exports[`valueInjectionLoader > should correctly insert values with directive an
36
63
"
37
64
` ;
38
65
66
+ exports [` valueInjectionLoader > should correctly insert values with directive and block comments 2` ] = `
67
+ "
68
+ /* test */
69
+ "use client";;globalThis["foo"] = "bar";
70
+ import * as Sentry from '@sentry/nextjs';
71
+ Sentry.init();
72
+ "
73
+ ` ;
74
+
39
75
exports [` valueInjectionLoader > should correctly insert values with directive and inline comments 1` ] = `
40
76
"
41
77
// test
@@ -45,6 +81,15 @@ exports[`valueInjectionLoader > should correctly insert values with directive an
45
81
"
46
82
` ;
47
83
84
+ exports [` valueInjectionLoader > should correctly insert values with directive and inline comments 2` ] = `
85
+ "
86
+ // test
87
+ "use client";;globalThis["foo"] = "bar";
88
+ import * as Sentry from '@sentry/nextjs';
89
+ Sentry.init();
90
+ "
91
+ ` ;
92
+
48
93
exports [` valueInjectionLoader > should correctly insert values with directive and multiline block comments 1` ] = `
49
94
"
50
95
/*
@@ -56,6 +101,17 @@ exports[`valueInjectionLoader > should correctly insert values with directive an
56
101
"
57
102
` ;
58
103
104
+ exports [` valueInjectionLoader > should correctly insert values with directive and multiline block comments 2` ] = `
105
+ "
106
+ /*
107
+ test
108
+ */
109
+ "use client";;globalThis["foo"] = "bar";
110
+ import * as Sentry from '@sentry/nextjs';
111
+ Sentry.init();
112
+ "
113
+ ` ;
114
+
59
115
exports [` valueInjectionLoader > should correctly insert values with directive and multiline block comments and a bunch of whitespace 1` ] = `
60
116
"
61
117
/*
@@ -65,6 +121,24 @@ exports[`valueInjectionLoader > should correctly insert values with directive an
65
121
66
122
67
123
124
+ "use client";;globalThis["foo"] = "bar";
125
+
126
+
127
+
128
+ import * as Sentry from '@sentry/nextjs';
129
+ Sentry.init();
130
+ "
131
+ ` ;
132
+
133
+ exports [` valueInjectionLoader > should correctly insert values with directive and multiline block comments and a bunch of whitespace 2` ] = `
134
+ "
135
+ /*
136
+ test
137
+ */
138
+
139
+
140
+
141
+
68
142
"use client";;globalThis["foo"] = "bar";
69
143
70
144
@@ -81,3 +155,11 @@ exports[`valueInjectionLoader > should correctly insert values with directive an
81
155
Sentry.init();
82
156
"
83
157
` ;
158
+
159
+ exports [` valueInjectionLoader > should correctly insert values with directive and semicolon 2` ] = `
160
+ "
161
+ "use client";;globalThis["foo"] = "bar";
162
+ import * as Sentry from '@sentry/nextjs';
163
+ Sentry.init();
164
+ "
165
+ ` ;
0 commit comments