Bug 1869371 - Use IOUtils.exists to check for file existence in test_sqlite.js r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D202464
This commit is contained in:
Barret Rennie 2024-02-23 18:25:33 +00:00
Родитель f221b6445f
Коммит cd51108f13
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -118,9 +118,8 @@ add_task(async function test_open_normal_error() {
// Ensure that our database doesn't already exist.
let path = PathUtils.join(PROFILE_DIR, "corrupt.sqlite");
await Assert.rejects(
IOUtils.stat(path),
/Could not stat file\(.*\) because it does not exist/,
Assert.ok(
!(await IOUtils.exists(path)),
"Database file should not exist yet"
);