Skip to content

Commit fe19bc7

Browse files
committed
feat(regex): EXPORT_DEFAULT_REGEX
Signed-off-by: Lexus Drumgold <[email protected]>
1 parent 089eaa2 commit fe19bc7

File tree

4 files changed

+845
-0
lines changed

4 files changed

+845
-0
lines changed
Lines changed: 301 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,301 @@
1+
// Vitest Snapshot v1
2+
3+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > class > should match export default abstract class [identifier] 1`] = `
4+
{
5+
"0": "export default abstract class Pet",
6+
"1": "abstract",
7+
"2": "class",
8+
"3": "Pet",
9+
"groups": {
10+
"exports": "Pet",
11+
"kind": "class",
12+
"modifiers": "abstract",
13+
},
14+
"index": 0,
15+
}
16+
`;
17+
18+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > class > should match export default abstract class 1`] = `
19+
{
20+
"0": "export default abstract class",
21+
"1": "abstract",
22+
"2": "class",
23+
"3": undefined,
24+
"groups": {
25+
"exports": undefined,
26+
"kind": "class",
27+
"modifiers": "abstract",
28+
},
29+
"index": 0,
30+
}
31+
`;
32+
33+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > class > should match export default class [identifier] 1`] = `
34+
{
35+
"0": "export default class Pet",
36+
"1": undefined,
37+
"2": "class",
38+
"3": "Pet",
39+
"groups": {
40+
"exports": "Pet",
41+
"kind": "class",
42+
"modifiers": undefined,
43+
},
44+
"index": 0,
45+
}
46+
`;
47+
48+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > class > should match export default class 1`] = `
49+
{
50+
"0": "export default class",
51+
"1": undefined,
52+
"2": "class",
53+
"3": undefined,
54+
"groups": {
55+
"exports": undefined,
56+
"kind": "class",
57+
"modifiers": undefined,
58+
},
59+
"index": 0,
60+
}
61+
`;
62+
63+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > const enum > should match export default const enum [identifier] 1`] = `
64+
{
65+
"0": "export default const enum Color",
66+
"1": undefined,
67+
"2": "const enum",
68+
"3": "Color",
69+
"groups": {
70+
"exports": "Color",
71+
"kind": "const enum",
72+
"modifiers": undefined,
73+
},
74+
"index": 0,
75+
}
76+
`;
77+
78+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > enum > should match export default enum [identifier] 1`] = `
79+
{
80+
"0": "export default enum TokenKind",
81+
"1": undefined,
82+
"2": "enum",
83+
"3": "TokenKind",
84+
"groups": {
85+
"exports": "TokenKind",
86+
"kind": "enum",
87+
"modifiers": undefined,
88+
},
89+
"index": 0,
90+
}
91+
`;
92+
93+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > expressions > should match export default [identifier] 1`] = `
94+
{
95+
"0": "export default foo",
96+
"1": undefined,
97+
"2": undefined,
98+
"3": "foo",
99+
"groups": {
100+
"exports": "foo",
101+
"kind": undefined,
102+
"modifiers": undefined,
103+
},
104+
"index": 0,
105+
}
106+
`;
107+
108+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > expressions > should match export default 1`] = `
109+
{
110+
"0": "export default",
111+
"1": undefined,
112+
"2": undefined,
113+
"3": undefined,
114+
"groups": {
115+
"exports": undefined,
116+
"kind": undefined,
117+
"modifiers": undefined,
118+
},
119+
"index": 0,
120+
}
121+
`;
122+
123+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > expressions > should match export default async 1`] = `
124+
{
125+
"0": "export default async",
126+
"1": "async",
127+
"2": undefined,
128+
"3": undefined,
129+
"groups": {
130+
"exports": undefined,
131+
"kind": undefined,
132+
"modifiers": "async",
133+
},
134+
"index": 0,
135+
}
136+
`;
137+
138+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > function > should match export default async function [identifier] 1`] = `
139+
{
140+
"0": "export default async function foo",
141+
"1": "async",
142+
"2": "function",
143+
"3": "foo",
144+
"groups": {
145+
"exports": "foo",
146+
"kind": "function",
147+
"modifiers": "async",
148+
},
149+
"index": 0,
150+
}
151+
`;
152+
153+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > function > should match export default async function 1`] = `
154+
{
155+
"0": "export default async function",
156+
"1": "async",
157+
"2": "function",
158+
"3": undefined,
159+
"groups": {
160+
"exports": undefined,
161+
"kind": "function",
162+
"modifiers": "async",
163+
},
164+
"index": 0,
165+
}
166+
`;
167+
168+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > function > should match export default function [identifier] 1`] = `
169+
{
170+
"0": "export default function foo",
171+
"1": undefined,
172+
"2": "function",
173+
"3": "foo",
174+
"groups": {
175+
"exports": "foo",
176+
"kind": "function",
177+
"modifiers": undefined,
178+
},
179+
"index": 0,
180+
}
181+
`;
182+
183+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > function > should match export default function 1`] = `
184+
{
185+
"0": "export default function",
186+
"1": undefined,
187+
"2": "function",
188+
"3": undefined,
189+
"groups": {
190+
"exports": undefined,
191+
"kind": "function",
192+
"modifiers": undefined,
193+
},
194+
"index": 0,
195+
}
196+
`;
197+
198+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > function* > should match export default async function* [identifier] 1`] = `
199+
{
200+
"0": "export default async function* generator",
201+
"1": "async",
202+
"2": "function*",
203+
"3": "generator",
204+
"groups": {
205+
"exports": "generator",
206+
"kind": "function*",
207+
"modifiers": "async",
208+
},
209+
"index": 0,
210+
}
211+
`;
212+
213+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > function* > should match export default async function* 1`] = `
214+
{
215+
"0": "export default async function*",
216+
"1": "async",
217+
"2": "function*",
218+
"3": undefined,
219+
"groups": {
220+
"exports": undefined,
221+
"kind": "function*",
222+
"modifiers": "async",
223+
},
224+
"index": 0,
225+
}
226+
`;
227+
228+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > function* > should match export default function* [identifier] 1`] = `
229+
{
230+
"0": "export default function* generator",
231+
"1": undefined,
232+
"2": "function*",
233+
"3": "generator",
234+
"groups": {
235+
"exports": "generator",
236+
"kind": "function*",
237+
"modifiers": undefined,
238+
},
239+
"index": 0,
240+
}
241+
`;
242+
243+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > function* > should match export default function* 1`] = `
244+
{
245+
"0": "export default function*",
246+
"1": undefined,
247+
"2": "function*",
248+
"3": undefined,
249+
"groups": {
250+
"exports": undefined,
251+
"kind": "function*",
252+
"modifiers": undefined,
253+
},
254+
"index": 0,
255+
}
256+
`;
257+
258+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > interface > should match export default interface [identifier] 1`] = `
259+
{
260+
"0": "export default interface IUser",
261+
"1": undefined,
262+
"2": "interface",
263+
"3": "IUser",
264+
"groups": {
265+
"exports": "IUser",
266+
"kind": "interface",
267+
"modifiers": undefined,
268+
},
269+
"index": 0,
270+
}
271+
`;
272+
273+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > namespace > should match export default namespace [identifier] 1`] = `
274+
{
275+
"0": "export default namespace Utils",
276+
"1": undefined,
277+
"2": "namespace",
278+
"3": "Utils",
279+
"groups": {
280+
"exports": "Utils",
281+
"kind": "namespace",
282+
"modifiers": undefined,
283+
},
284+
"index": 0,
285+
}
286+
`;
287+
288+
exports[`unit:EXPORT_DEFAULT_REGEX > exports > type > should match export default type [identifier] 1`] = `
289+
{
290+
"0": "export default type Options",
291+
"1": undefined,
292+
"2": "type",
293+
"3": "Options",
294+
"groups": {
295+
"exports": "Options",
296+
"kind": "type",
297+
"modifiers": undefined,
298+
},
299+
"index": 0,
300+
}
301+
`;

0 commit comments

Comments
 (0)