Skip to content

Commit afc7e3a

Browse files
committed
test(vite): isolate the origin specs from NS_HTTPS and assert recovery completes
The origin specs clear NS_HTTPS with the other env flags, the two reinstall cases that deliver nothing assert that the recovery reached the watch action, and the adb reverse ordering checks require the reverse to have run.
1 parent 65687c0 commit afc7e3a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎test/controllers/run-controller.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ describe("RunController", () => {
330330
"NS_HMR_HOST",
331331
"NS_HMR_NO_ADB_REVERSE",
332332
"NS_HMR_PREFER_LAN_HOST",
333+
"NS_HTTPS",
333334
"NS_ADB_REVERSE_READY",
334335
"NS_DEVICE_SERIAL",
335336
"NS_ADB_PATH",
@@ -557,6 +558,7 @@ describe("RunController", () => {
557558
JSON.parse(filesAtFullSync["emulator-5554"]).origin,
558559
"http://127.0.0.1:5173",
559560
);
561+
assert.include(events, "adb reverse tcp:5173 tcp:5173");
560562
assert.isBelow(
561563
events.indexOf("adb reverse tcp:5173 tcp:5173"),
562564
events.indexOf("fullSync emulator-5554"),
@@ -709,6 +711,7 @@ describe("RunController", () => {
709711
await syncChange(iOSSimulator);
710712

711713
assert.deepStrictEqual(afterInstall, []);
714+
assert.equal(watchActions, 2);
712715
});
713716

714717
it("delivers nothing for a @nativescript/vite without dev-server.json", async () => {
@@ -718,6 +721,7 @@ describe("RunController", () => {
718721
await syncChange(iOSSimulator);
719722

720723
assert.deepStrictEqual(afterInstall, []);
724+
assert.equal(watchActions, 2);
721725
});
722726
});
723727

@@ -746,6 +750,7 @@ describe("RunController", () => {
746750
assert.equal(process.env.NS_ADB_REVERSE_READY, "1");
747751
assert.equal(process.env.NS_DEVICE_SERIAL, "emulator-5554");
748752
assert.equal(process.env.NS_ADB_PATH, "adb");
753+
assert.include(events, "adb reverse tcp:5173 tcp:5173");
749754
assert.isBelow(
750755
events.indexOf("adb reverse tcp:5173 tcp:5173"),
751756
events.indexOf("prepare android"),

0 commit comments

Comments
 (0)