Page MenuHomePhabricator

D11241.id.diff
No OneTemporary

D11241.id.diff

diff --git a/web/database/queries/communities-queries.test.js b/web/database/queries/communities-queries.test.js
--- a/web/database/queries/communities-queries.test.js
+++ b/web/database/queries/communities-queries.test.js
@@ -41,10 +41,12 @@
beforeEach(() => {
if (!dbModule) {
- return;
+ throw new Error('Database module is missing');
}
-
queryExecutor = new dbModule.SQLiteQueryExecutor(FILE_PATH);
+ if (!queryExecutor) {
+ throw new Error('SQLiteQueryExecutor is missing');
+ }
queryExecutor?.replaceCommunity(
convertCommunityInfoToClientDBCommunityInfo({
communityInfo: TEST_COMMUNITY_1,
diff --git a/web/database/queries/draft-queries.test.js b/web/database/queries/draft-queries.test.js
--- a/web/database/queries/draft-queries.test.js
+++ b/web/database/queries/draft-queries.test.js
@@ -14,7 +14,13 @@
});
beforeEach(() => {
+ if (!dbModule) {
+ throw new Error('Database module is missing');
+ }
queryExecutor = new dbModule.SQLiteQueryExecutor(FILE_PATH);
+ if (!queryExecutor) {
+ throw new Error('SQLiteQueryExecutor is missing');
+ }
queryExecutor.updateDraft('thread_a', 'draft a');
queryExecutor.updateDraft('thread_b', 'draft b');
});
diff --git a/web/database/queries/keyservers-queries.test.js b/web/database/queries/keyservers-queries.test.js
--- a/web/database/queries/keyservers-queries.test.js
+++ b/web/database/queries/keyservers-queries.test.js
@@ -56,9 +56,12 @@
beforeEach(() => {
if (!dbModule) {
- return;
+ throw new Error('Database module is missing');
}
queryExecutor = new dbModule.SQLiteQueryExecutor(FILE_PATH);
+ if (!queryExecutor) {
+ throw new Error('SQLiteQueryExecutor is missing');
+ }
queryExecutor?.replaceKeyserver(
convertKeyserverInfoToClientDBKeyserverInfo({
keyserverInfo: TEST_KEYSERVER_1,
diff --git a/web/database/queries/message-store-threads-queries.test.js b/web/database/queries/message-store-threads-queries.test.js
--- a/web/database/queries/message-store-threads-queries.test.js
+++ b/web/database/queries/message-store-threads-queries.test.js
@@ -14,7 +14,13 @@
});
beforeEach(() => {
+ if (!dbModule) {
+ throw new Error('Database module is missing');
+ }
queryExecutor = new dbModule.SQLiteQueryExecutor(FILE_PATH);
+ if (!queryExecutor) {
+ throw new Error('SQLiteQueryExecutor is missing');
+ }
queryExecutor.replaceMessageStoreThreads([
{ id: '1', startReached: 0 },
{ id: '2', startReached: 0 },
diff --git a/web/database/queries/message-to-device-queries.test.js b/web/database/queries/message-to-device-queries.test.js
--- a/web/database/queries/message-to-device-queries.test.js
+++ b/web/database/queries/message-to-device-queries.test.js
@@ -65,9 +65,12 @@
beforeEach(() => {
if (!dbModule) {
- return;
+ throw new Error('Database module is missing');
}
queryExecutor = new dbModule.SQLiteQueryExecutor(FILE_PATH);
+ if (!queryExecutor) {
+ throw new Error('SQLiteQueryExecutor is missing');
+ }
queryExecutor?.addMessagesToDevice([
TEST_MSG_1,
TEST_MSG_2,
diff --git a/web/database/queries/messages-and-media-queries.test.js b/web/database/queries/messages-and-media-queries.test.js
--- a/web/database/queries/messages-and-media-queries.test.js
+++ b/web/database/queries/messages-and-media-queries.test.js
@@ -14,7 +14,13 @@
});
beforeEach(() => {
+ if (!dbModule) {
+ throw new Error('Database module is missing');
+ }
queryExecutor = new dbModule.SQLiteQueryExecutor(FILE_PATH);
+ if (!queryExecutor) {
+ throw new Error('SQLiteQueryExecutor is missing');
+ }
queryExecutor.replaceMessageWeb({
id: '1',
localID: { value: '', isNull: true },
diff --git a/web/database/queries/metadata-queries.test.js b/web/database/queries/metadata-queries.test.js
--- a/web/database/queries/metadata-queries.test.js
+++ b/web/database/queries/metadata-queries.test.js
@@ -17,7 +17,13 @@
});
beforeEach(() => {
+ if (!dbModule) {
+ throw new Error('Database module is missing');
+ }
queryExecutor = new dbModule.SQLiteQueryExecutor(FILE_PATH);
+ if (!queryExecutor) {
+ throw new Error('SQLiteQueryExecutor is missing');
+ }
queryExecutor.setMetadata(TEST_USER_ID_KEY, TEST_USER_ID_VAL);
});
diff --git a/web/database/queries/olm-persist-data-queries.test.js b/web/database/queries/olm-persist-data-queries.test.js
--- a/web/database/queries/olm-persist-data-queries.test.js
+++ b/web/database/queries/olm-persist-data-queries.test.js
@@ -14,7 +14,13 @@
});
beforeEach(() => {
+ if (!dbModule) {
+ throw new Error('Database module is missing');
+ }
queryExecutor = new dbModule.SQLiteQueryExecutor(FILE_PATH);
+ if (!queryExecutor) {
+ throw new Error('SQLiteQueryExecutor is missing');
+ }
queryExecutor.storeOlmPersistAccount('accountData');
queryExecutor.storeOlmPersistSession({
diff --git a/web/database/queries/report-queries.test.js b/web/database/queries/report-queries.test.js
--- a/web/database/queries/report-queries.test.js
+++ b/web/database/queries/report-queries.test.js
@@ -14,7 +14,13 @@
});
beforeEach(() => {
+ if (!dbModule) {
+ throw new Error('Database module is missing');
+ }
queryExecutor = new dbModule.SQLiteQueryExecutor(FILE_PATH);
+ if (!queryExecutor) {
+ throw new Error('SQLiteQueryExecutor is missing');
+ }
queryExecutor.replaceReport({ id: '1', report: '{report_content_1}' });
queryExecutor.replaceReport({ id: '2', report: '{report_content_2}' });
});
diff --git a/web/database/queries/storage-engine-queries.test.js b/web/database/queries/storage-engine-queries.test.js
--- a/web/database/queries/storage-engine-queries.test.js
+++ b/web/database/queries/storage-engine-queries.test.js
@@ -17,7 +17,13 @@
});
beforeEach(() => {
+ if (!dbModule) {
+ throw new Error('Database module is missing');
+ }
queryExecutor = new dbModule.SQLiteQueryExecutor(FILE_PATH);
+ if (!queryExecutor) {
+ throw new Error('SQLiteQueryExecutor is missing');
+ }
queryExecutor.setPersistStorageItem(TEST_KEY, TEST_ITEM);
});
diff --git a/web/database/queries/threads-queries.test.js b/web/database/queries/threads-queries.test.js
--- a/web/database/queries/threads-queries.test.js
+++ b/web/database/queries/threads-queries.test.js
@@ -14,7 +14,13 @@
});
beforeEach(() => {
+ if (!dbModule) {
+ throw new Error('Database module is missing');
+ }
queryExecutor = new dbModule.SQLiteQueryExecutor(FILE_PATH);
+ if (!queryExecutor) {
+ throw new Error('SQLiteQueryExecutor is missing');
+ }
queryExecutor.replaceThreadWeb({
id: '1',
type: 1,
diff --git a/web/database/queries/user-quries.test.js b/web/database/queries/user-quries.test.js
--- a/web/database/queries/user-quries.test.js
+++ b/web/database/queries/user-quries.test.js
@@ -42,9 +42,12 @@
beforeEach(() => {
if (!dbModule) {
- return;
+ throw new Error('Database module is missing');
}
queryExecutor = new dbModule.SQLiteQueryExecutor(FILE_PATH);
+ if (!queryExecutor) {
+ throw new Error('SQLiteQueryExecutor is missing');
+ }
queryExecutor?.replaceUser(convertUserInfoToClientDBUserInfo(TEST_USER_1));
queryExecutor?.replaceUser(convertUserInfoToClientDBUserInfo(TEST_USER_2));
});

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 7:12 PM (8 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2700863
Default Alt Text
D11241.id.diff (7 KB)

Event Timeline