FEAT => 本次更新项目为:
可以构建app了
This commit is contained in:
@@ -1,8 +1,2 @@
|
||||
# 禁用所有测试
|
||||
android.enableUnitTestBinaryResources=false
|
||||
android.enableAndroidTestBinaryResources=false
|
||||
# 禁用测试
|
||||
android.testInstrumentationRunner=androidx.test.runner.AndroidJUnitRunner
|
||||
|
||||
# 跳过测试任务
|
||||
android.testOptions.unitTests.all.enabled=false
|
||||
android.testOptions.androidTest.enabled=false
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.getcapacitor.myapp;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
|
||||
@Test
|
||||
public void useAppContext() throws Exception {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
|
||||
assertEquals("com.getcapacitor.app", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.getcapacitor.myapp;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
|
||||
@Test
|
||||
public void addition_isCorrect() throws Exception {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||
@@ -23,5 +23,6 @@ android.useAndroidX=true
|
||||
|
||||
# 禁用测试
|
||||
android.testInstrumentationRunner=androidx.test.runner.AndroidJUnitRunner
|
||||
android.enableUnitTestBinaryResources=false
|
||||
android.enableAndroidTestBinaryResources=false
|
||||
|
||||
# 禁用实验性测试选项
|
||||
android.experimental.testOptions.emulatorSnapshots.maxSnapshotsForTestFailures=0
|
||||
|
||||
Reference in New Issue
Block a user