Skip to content

Commit 0a5c21a

Browse files
Better testing
1 parent 968078a commit 0a5c21a

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
11
export * from './bar';
2+
3+
function alpha() {
4+
return 'Alpha';
5+
}
6+
7+
const beta = 'Beta';
8+
9+
export {
10+
alpha,
11+
beta
12+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
export {foo} from './bar';
2+
3+
export function alpha() {
4+
return 'Alpha';
5+
}
6+
7+
export const beta = 'Beta';

src/index.spec.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function transformFile(file, opts) {
8080

8181
function extractCodePath(code) {
8282
// Extract the import or export path.
83-
const m = code.match(/(import|export)[\s\S]+from[\s\S}]+['"]([^'"]*)['"]/);
83+
const m = code.match(/(import|export)[^'"]+from\s+['"]([^'"]*)['"]/);
8484
return m ? m[2] : null;
8585
}
8686

0 commit comments

Comments
 (0)