File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,26 @@ describe("steps/generateChanges", () => {
62
62
` ) ;
63
63
} ) ;
64
64
65
+ it ( "matches import statements with multiple named imports" , ( ) => {
66
+ const result = regex . exec ( `import {
67
+ package as myPackage,
68
+ otherPackage,
69
+ } from '../package';` ) ;
70
+ expect ( result ) . toMatchInlineSnapshot ( `
71
+ [
72
+ "import {
73
+ package as myPackage,
74
+ otherPackage,
75
+ } from '../package'",
76
+ "import {
77
+ package as myPackage,
78
+ otherPackage,
79
+ } from ",
80
+ "../package",
81
+ ]
82
+ ` ) ;
83
+ } )
84
+
65
85
it ( "matches export * statements" , ( ) => {
66
86
const result = regex . exec ( `export * from 'package';` ) ;
67
87
expect ( result ) . toMatchInlineSnapshot ( `
@@ -119,6 +139,26 @@ describe("steps/generateChanges", () => {
119
139
` ) ;
120
140
} ) ;
121
141
142
+ it ( "matches import statements with multiple named imports" , ( ) => {
143
+ const result = regex . exec ( `export {
144
+ package as myPackage,
145
+ otherPackage,
146
+ } from '../package';` ) ;
147
+ expect ( result ) . toMatchInlineSnapshot ( `
148
+ [
149
+ "export {
150
+ package as myPackage,
151
+ otherPackage,
152
+ } from '../package'",
153
+ "export {
154
+ package as myPackage,
155
+ otherPackage,
156
+ } from ",
157
+ "../package",
158
+ ]
159
+ ` ) ;
160
+ } )
161
+
122
162
it ( "matches require statements" , ( ) => {
123
163
const result = regex . exec ( `require('package');` ) ;
124
164
expect ( result ) . toMatchInlineSnapshot ( `
You can’t perform that action at this time.
0 commit comments