From bb9eea455a2aba6ca6a9d75730f106b1f6369414 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Sat, 26 Sep 2026 10:40:19 -0700 Subject: [PATCH] test: fix newline container deletion assertion --- test/unit/commands/file-actions.spec.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/unit/commands/file-actions.spec.ts b/test/unit/commands/file-actions.spec.ts index 50fce26e..3e626833 100644 --- a/test/unit/commands/file-actions.spec.ts +++ b/test/unit/commands/file-actions.spec.ts @@ -132,8 +132,11 @@ describe('File Actions', function () { const shell = sandbox.stub(driver.adb, 'shell').resolves(''); shell.onCall(1).resolves('__PASS__'); shell.onCall(2).resolves('__PASS__'); - await driver.mobileDeleteFile(remotePath); - assert.strictEqual(shell.calledWithExactly([`run-as ${pkg} [ -e '${fullPath}' ] && echo __PASS__`]), true); + assert.strictEqual(await driver.mobileDeleteFile(remotePath), true); + assert.strictEqual( + shell.calledWithExactly([`run-as ${pkg} sh -c '[ -e '"'"'${fullPath}'"'"' ] && echo __PASS__'`]), + true, + ); assert.strictEqual(shell.calledWithExactly(['run-as', pkg, `rm -f '${fullPath}'`]), true); }); });