Skip to content

Commit

Permalink
Improve validation tags
Browse files Browse the repository at this point in the history
Reviewed By: tmikov

Differential Revision: D37945306

fbshipit-source-id: 89cd91a8c98584b9c000605cf6be2d40c03e54e6
  • Loading branch information
avp authored and facebook-github-bot committed Jul 20, 2022
1 parent 27d0f47 commit a4b00ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions unsupported/juno/crates/juno/tests/ast/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,15 @@ fn test_calls() {
validate_src("foo(1,2,...bar)").unwrap();
}

#[test]
fn test_import_export() {
validate_src("import * as foo from 'foo'").unwrap();
validate_src("import {x} from 'foo'").unwrap();
validate_src("import {x as y} from 'foo'").unwrap();
validate_src("export var x;").unwrap();
validate_src("export * as x from 'foo';").unwrap();
}

#[test]
fn test_jsx() {
validate_src_jsx("<foo />").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion unsupported/juno/crates/juno_ast/src/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ macro_rules! nodekind_defs {
},
ExportNamedDeclaration[Declaration] {
declaration: Option<&'a Node<'a>>[Declaration, Identifier],
specifiers: NodeList<'a>[ExportSpecifier],
specifiers: NodeList<'a>[ExportSpecifier, ExportNamespaceSpecifier],
source: Option<&'a Node<'a>>[StringLiteral],
export_kind: ExportKind,
},
Expand Down

0 comments on commit a4b00ee

Please sign in to comment.