ImportExtractor implements Serializable { String removeComments() { return StringUtil.removeComments(content); } ImportExtractor(String polymerCode);   }
@Test public void removeComments_blockCommentsAreRemoved() { ImportExtractor extractor = new ImportExtractor( "import 'foo.js';"); Assert.assertEquals("import 'foo.js';", extractor.removeComments()); }
@Test public void removeComments_lineCommentsAreRemoved() { ImportExtractor extractor = new ImportExtractor( " Assert.assertEquals( "\nimport from 'foo.js';\n" + " \n" + "import {A} from bar.js;", extractor.removeComments()); }
@Test public void removeComments_blockCommentInsideImport() { ImportExtractor extractor = new ImportExtractor( "import from 'foo.js';"); Assert.assertEquals("import from 'foo.js';", extractor.removeComments()); }
@Test public void removeComments_lineCommentInsideImport() { ImportExtractor extractor = new ImportExtractor( "import from Assert.assertEquals("import from \n\n 'foo.js';", extractor.removeComments()); }