Skip to content

Commit

Permalink
Move test for swc-project#226
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Nov 25, 2019
1 parent 25b6e18 commit 6edc7bf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/projects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ fn issue_225() {
assert!(s.contains("var _foo = _interopRequireDefault(require('foo'))"));
}

/// should handle exportNamespaceFrom configured by .swcrc
#[test]
fn issue_226() {
let s = file("tests/issue-226/input.js").unwrap();

assert!(s.contains("import * as _Foo from 'bar';"));
assert!(s.contains("export { _Foo as Foo };"));
}

#[test]
fn issue_466_1() {
project("tests/projects/issue-466-1");
Expand Down
9 changes: 9 additions & 0 deletions tests/projects/issue-226/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"jsc": {
"parser": {
"syntax": "ecmascript",
"exportNamespaceFrom": true,
"exportDefaultFrom": true
}
}
}
1 change: 1 addition & 0 deletions tests/projects/issue-226/input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * as Foo from 'bar';

0 comments on commit 6edc7bf

Please sign in to comment.