-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
85 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/test/java/tests/de/espend/idea/vuejs/index/fixtures/appentry-mount-ref-v2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import App from './App.vue'; | ||
|
||
let app = new App(); | ||
app.$mount(el); |
34 changes: 34 additions & 0 deletions
34
src/test/java/tests/de/espend/idea/vuejs/index/utils/VueJsComponentIndexUtilTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package tests.de.espend.idea.vuejs.index.utils; | ||
|
||
import com.intellij.psi.PsiFile; | ||
import com.intellij.psi.PsiFileFactory; | ||
import com.intellij.psi.xml.XmlFile; | ||
import de.espend.idea.vuejs.index.utils.VueJsComponentIndexUtil; | ||
import org.jetbrains.vuejs.codeInsight.VueUtilKt; | ||
import org.jetbrains.vuejs.lang.html.VueFile; | ||
import org.jetbrains.vuejs.lang.html.VueFileType; | ||
import tests.de.espend.idea.vuejs.VueJsLightJavaCodeInsightFixtureTestCase; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class VueJsComponentIndexUtilTest extends VueJsLightJavaCodeInsightFixtureTestCase { | ||
public String getTestDataPath() { | ||
return "src/test/java/tests/de/espend/idea/vuejs/index/fixtures"; | ||
} | ||
|
||
public void testFoo() { | ||
PsiFile psiFile = myFixture.configureByFile("component-composition.vue"); | ||
|
||
//String text = psiFile.getText(); | ||
//PsiFile test = PsiFileFactory.getInstance(getProject()).createFileFromText("component-composition.vue", VueFileType.INSTANCE, text); | ||
|
||
VueFile vueFileFromText = VueUtilKt.createVueFileFromText(getProject(), psiFile.getText()); | ||
|
||
// PsiFile psiFile = myFixture.configureByFile("component-composition.vue"); | ||
|
||
// Map<String, List<String>> componentsForIndex = VueJsComponentIndexUtil.getComponentsForIndex((XmlFile) test); | ||
|
||
System.out.println(vueFileFromText); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters