tutanota/test/tests/Suite.ts

253 lines
11 KiB
TypeScript
Raw Normal View History

2023-06-29 18:26:45 +02:00
import o from "@tutao/otest"
import "./api/common/error/RestErrorTest.js"
import "./api/common/error/TutanotaErrorTest.js"
import "./api/common/mail/CommonMailUtilsTest.js"
import "./api/common/utils/BirthdayUtilsTest.js"
import "./api/common/utils/CommonFormatterTest.js"
import "./api/common/utils/EntityUtilsTest.js"
import "./api/common/EntityFunctionsTest.js"
import "./api/common/utils/FileUtilsTest.js"
import "./api/common/utils/LoggerTest.js"
import "./api/common/utils/PlainTextSearchTest.js"
import "./api/main/EntropyCollectorTest.js"
import "./api/worker/CompressionTest.js"
import "./api/worker/EventBusClientTest.js"
import "./api/worker/EventBusEventCoordinatorTest.js"
import "./api/worker/SuspensionHandlerTest.js"
import "./api/worker/UrlifierTest.js"
import "./api/worker/crypto/AsymmetricCryptoFacadeTest.js"
import "./api/worker/crypto/CompatibilityTest.js"
import "./api/worker/crypto/CryptoMapperTest.js"
import "./api/worker/crypto/CryptoFacadeTest.js"
import "./api/worker/crypto/EntityAdapterTest.js"
import "./api/worker/crypto/ModelMapperTest.js"
import "./api/worker/crypto/ModelMapperTransformationsTest.js"
import "./api/worker/crypto/OwnerEncSessionKeysUpdateQueueTest.js"
import "./api/worker/crypto/TypeMapperTest.js"
import "./api/worker/facades/ApplicationTypesFacadeTest.js"
import "./api/worker/facades/BlobAccessTokenFacadeTest.js"
import "./api/worker/facades/BlobFacadeTest.js"
import "./api/worker/facades/CalendarFacadeTest.js"
import "./api/worker/facades/ConfigurationDbTest.js"
import "./api/worker/facades/ContactFacadeTest.js"
import "./api/worker/facades/GroupManagementFacadeTest.js"
import "./api/worker/facades/KeyAuthenticationFacadeTest.js"
import "./api/worker/facades/KeyCacheTest.js"
import "./api/worker/facades/KeyLoaderFacadeTest.js"
import "./api/worker/facades/KeyRotationFacadeTest.js"
import "./api/worker/facades/KyberFacadeTest.js"
import "./api/worker/facades/LoginFacadeTest.js"
import "./api/worker/facades/MailAddressFacadeTest.js"
import "./api/worker/facades/MailExportFacadeTest.js"
import "./api/worker/facades/MailExportTokenFacadeTest.js"
import "./api/worker/facades/MailFacadeTest.js"
import "./api/worker/facades/PQFacadeTest.js"
import "./api/worker/facades/PQMessageTest.js"
import "./api/worker/facades/PublicKeyProviderTest.js"
import "./api/worker/facades/RolloutFacadeTest.js"
import "./api/worker/facades/RsaPqPerformanceTest.js"
import "./api/worker/facades/UserFacadeTest.js"
import "./api/worker/invoicegen/PdfInvoiceGeneratorTest.js"
import "./api/worker/invoicegen/XRechnungInvoiceGeneratorTest.js"
import "./api/worker/pdf/DeflaterTest.js"
import "./api/worker/pdf/PdfDocumentTest.js"
import "./api/worker/pdf/PdfObjectTest.js"
import "./api/worker/pdf/PdfWriterTest.js"
import "./api/worker/rest/CacheStorageProxyTest.js"
import "./api/worker/rest/CborDateEncoderTest.js"
import "./api/worker/rest/CustomCacheHandlerTest.js"
import "./api/worker/rest/EntityRestCacheTest.js"
import "./api/worker/rest/EntityRestClientTest.js"
import "./api/worker/rest/EphemeralCacheStorageTest.js"
import "./api/worker/rest/PatchGeneratorTest.js"
import "./api/worker/rest/ServiceExecutorTest.js"
import "./api/worker/search/BulkMailLoaderTest.js"
import "./api/worker/search/ContactIndexerTest.js"
import "./api/worker/search/EventQueueTest.js"
import "./api/worker/search/IndexUtilsTest.js"
import "./api/worker/search/IndexerCoreTest.js"
Add SQLite search on clients where offline storage is available - Introduce a separate Indexer for SQLite using FTS5 - Split search backends and use the right one based on client (IndexedDB for Browser, and OfflineStorage everywhere else) - Split SearchFacade into two implementations - Adds a table for storing unindexed metadata for mails - Escape special character for SQLite search To escape special characters from fts5 syntax. However, simply surrounding each token in quotes is sufficient to do this. See section 3.1 "FTS5 Strings" here: https://www.sqlite.org/fts5.html which states that a string may be specified by surrounding it in quotes, and that special string requirements only exist for strings that are not in quotes. - Add EncryptedDbWrapper - Simplify out of sync logic in IndexedDbIndexer - Fix deadlock when initializing IndexedDbIndexer - Cleanup indexedDb index when migrating to offline storage index - Pass contactSuggestionFacade to IndexedDbSearchFacade The only suggestion facade used by IndexedDbSearchFacade was the contact suggestion facade. So we made it clearer. - Remove IndexerCore stats - Split custom cache handlers into separate files We were already doing this with user, so we should do this with the other entity types. - Rewrite IndexedDb tests - Add OfflineStorage indexer tests - Add custom cache handlers tests to OfflineStorageTest - Add tests for custom cache handlers with ephemeral storage - Use dbStub instead of dbMock in IndexedDbIndexerTest - Replace spy with testdouble in IndexedDbIndexerTest Close #8550 Co-authored-by: ivk <ivk@tutao.de> Co-authored-by: paw <paw-hub@users.noreply.github.com> Co-authored-by: wrd <wrd@tutao.de> Co-authored-by: bir <bir@tutao.de> Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
2025-03-13 16:37:55 +01:00
import "./api/worker/search/IndexedDbIndexerTest.js"
import "./api/worker/search/MailIndexerTest.js"
Add SQLite search on clients where offline storage is available - Introduce a separate Indexer for SQLite using FTS5 - Split search backends and use the right one based on client (IndexedDB for Browser, and OfflineStorage everywhere else) - Split SearchFacade into two implementations - Adds a table for storing unindexed metadata for mails - Escape special character for SQLite search To escape special characters from fts5 syntax. However, simply surrounding each token in quotes is sufficient to do this. See section 3.1 "FTS5 Strings" here: https://www.sqlite.org/fts5.html which states that a string may be specified by surrounding it in quotes, and that special string requirements only exist for strings that are not in quotes. - Add EncryptedDbWrapper - Simplify out of sync logic in IndexedDbIndexer - Fix deadlock when initializing IndexedDbIndexer - Cleanup indexedDb index when migrating to offline storage index - Pass contactSuggestionFacade to IndexedDbSearchFacade The only suggestion facade used by IndexedDbSearchFacade was the contact suggestion facade. So we made it clearer. - Remove IndexerCore stats - Split custom cache handlers into separate files We were already doing this with user, so we should do this with the other entity types. - Rewrite IndexedDb tests - Add OfflineStorage indexer tests - Add custom cache handlers tests to OfflineStorageTest - Add tests for custom cache handlers with ephemeral storage - Use dbStub instead of dbMock in IndexedDbIndexerTest - Replace spy with testdouble in IndexedDbIndexerTest Close #8550 Co-authored-by: ivk <ivk@tutao.de> Co-authored-by: paw <paw-hub@users.noreply.github.com> Co-authored-by: wrd <wrd@tutao.de> Co-authored-by: bir <bir@tutao.de> Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
2025-03-13 16:37:55 +01:00
import "./api/worker/search/IndexedDbMailIndexerBackendTest.js"
import "./api/worker/search/IndexedDbSearchFacadeTest.js"
import "./api/worker/search/SearchIndexEncodingTest.js"
import "./api/worker/search/SuggestionFacadeTest.js"
import "./serviceworker/SwTest.js"
2025-02-10 13:15:28 +01:00
import "./api/worker/facades/KeyVerificationFacadeTest.js"
import "./api/worker/utils/SleepDetectorTest.js"
import "./calendar/AlarmSchedulerTest.js"
import "./calendar/CalendarAgendaViewTest.js"
import "./calendar/CalendarGuiUtilsTest.js"
import "./calendar/CalendarImporterTest.js"
import "./calendar/CalendarInvitesTest.js"
import "./calendar/CalendarModelTest.js"
import "./calendar/CalendarParserTest.js"
import "./calendar/CalendarUtilsTest.js"
import "./calendar/CalendarViewModelTest.js"
import "./calendar/EventDragHandlerTest.js"
Rewrite calendar editor and calendar popup make updating calendar events delete the old uidIndex correctly when updating calendar events, we sometimes had events in the delete call that do not have the hashedUid set, causing us to be unable to delete the uid index entry. when re-creating the event, that leads to a db.exists error. make sure the event popup always has the current version of the event. now that edit operations are possible from the popup, we either need to close the popup after it calls the model factory to make sure it's only called once, or make sure the model factory always uses the last version of the event. we opted for the first option here to make sure repeated changes to the attendance are actually sent as a response. make contact resolution failure more controlled for external users previously, responding to an event from an external mailbox would try to resolve a contact for the response mail, fail, try to create a contact and fail again on an opaque assertNotNull. show partial editability banner when creating new event in shared calendar make it possible to add alarms to invites in private calendars don't make saving/sending invites and cancellations depend on user choice for own events updateExistingEvent() should call sendNotifications/saveEvent even when there are no update worthy changes or the user did not tick the sendUpdates checkbox because invites/cancellations must be sent in any case and sending updates has a separate check for sendUpdates also make the sendUpdates button on the popup use the same logic as the shortcut when clicked (ask confirmation) Co-authored-by: nig <nig@tutao.de>
2023-04-25 16:54:46 +02:00
import "./calendar/eventeditor/CalendarEventAlarmModelTest.js"
import "./calendar/eventeditor/CalendarEventModelTest.js"
import "./calendar/eventeditor/CalendarEventWhenModelTest.js"
import "./calendar/eventeditor/CalendarEventWhoModelTest.js"
import "./calendar/eventeditor/CalendarNotificationModelTest.js"
import "./contacts/ContactListEditorTest.js"
import "./contacts/ContactMergeUtilsTest.js"
import "./contacts/ContactUtilsTest.js"
import "./contacts/VCardExporterTest.js"
import "./contacts/VCardImporterTest.js"
import "./file/FileControllerTest.js"
import "./gui/ColorTest.js"
import "./gui/GuiUtilsTest.js"
import "./gui/ScopedRouterTest.js"
import "./gui/ThemeControllerTest.js"
import "./gui/animation/AnimationsTest.js"
import "./gui/base/WizardDialogNTest.js"
import "./login/LoginViewModelTest.js"
import "./login/PostLoginUtilsTest.js"
import "./mail/InboxRuleHandlerTest.js"
import "./mail/KnowledgeBaseSearchFilterTest.js"
import "./mail/MailModelTest.js"
import "./mail/MailUtilsSignatureTest.js"
import "./mail/SendMailModelTest.js"
import "./mail/TemplateSearchFilterTest.js"
import "./mail/export/BundlerTest.js"
import "./mail/export/ExporterTest.js"
import "./mail/model/ConversationListModelTest.js"
2022-12-19 16:38:14 +01:00
import "./mail/model/FolderSystemTest.js"
import "./mail/model/MailListModelTest.js"
import "./mail/view/ConversationViewModelTest.js"
import "./mail/view/MailViewModelTest.js"
import "./mail/view/MailViewerViewModelTest.js"
import "./misc/ClientDetectorTest.js"
import "./misc/DeviceConfigTest.js"
import "./misc/FormatValidatorTest.js"
import "./misc/FormatterTest.js"
import "./misc/HtmlSanitizerTest.js"
import "./misc/UserSatisfactionDialogTests.js"
import "./misc/LanguageViewModelTest.js"
import "./misc/ListElementListModelTest.js"
import "./misc/ListModelTest.js"
import "./misc/NewsModelTest.js"
import "./misc/OutOfOfficeNotificationTest.js"
import "./misc/ParserTest.js"
import "./misc/PasswordGeneratorTest.js"
import "./misc/PasswordModelTest.js"
import "./misc/PasswordUtilsTest.js"
import "./misc/RecipientsModelTest.js"
import "./misc/SchedulerTest.js"
import "./misc/UsageTestModelTest.js"
import "./misc/credentials/CredentialsProviderTest.js"
import "./misc/news/items/ReferralLinkNewsTest.js"
import "./misc/parsing/MailAddressParserTest.js"
import "./misc/webauthn/WebauthnClientTest.js"
import "./native/main/MailExportControllerTest.js"
import "./settings/TemplateEditorModelTest.js"
import "./settings/UserDataExportTest.js"
import "./settings/login/secondfactor/SecondFactorEditModelTest.js"
import "./settings/mailaddress/MailAddressTableModelTest.js"
import "./settings/whitelabel/CustomColorEditorTest.js"
import "./subscription/CreditCardViewModelTest.js"
import "./subscription/PriceUtilsTest.js"
import "./subscription/SignupFormTest.js"
import "./subscription/CaptchaTest.js"
import "./subscription/SubscriptionUtilsTest.js"
import "./support/FaqModelTest.js"
import "./translations/TranslationKeysTest.js"
Add SQLite search on clients where offline storage is available - Introduce a separate Indexer for SQLite using FTS5 - Split search backends and use the right one based on client (IndexedDB for Browser, and OfflineStorage everywhere else) - Split SearchFacade into two implementations - Adds a table for storing unindexed metadata for mails - Escape special character for SQLite search To escape special characters from fts5 syntax. However, simply surrounding each token in quotes is sufficient to do this. See section 3.1 "FTS5 Strings" here: https://www.sqlite.org/fts5.html which states that a string may be specified by surrounding it in quotes, and that special string requirements only exist for strings that are not in quotes. - Add EncryptedDbWrapper - Simplify out of sync logic in IndexedDbIndexer - Fix deadlock when initializing IndexedDbIndexer - Cleanup indexedDb index when migrating to offline storage index - Pass contactSuggestionFacade to IndexedDbSearchFacade The only suggestion facade used by IndexedDbSearchFacade was the contact suggestion facade. So we made it clearer. - Remove IndexerCore stats - Split custom cache handlers into separate files We were already doing this with user, so we should do this with the other entity types. - Rewrite IndexedDb tests - Add OfflineStorage indexer tests - Add custom cache handlers tests to OfflineStorageTest - Add tests for custom cache handlers with ephemeral storage - Use dbStub instead of dbMock in IndexedDbIndexerTest - Replace spy with testdouble in IndexedDbIndexerTest Close #8550 Co-authored-by: ivk <ivk@tutao.de> Co-authored-by: paw <paw-hub@users.noreply.github.com> Co-authored-by: wrd <wrd@tutao.de> Co-authored-by: bir <bir@tutao.de> Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
2025-03-13 16:37:55 +01:00
import "./api/worker/search/IndexedDbContactIndexerBackendTest.js"
import "./api/worker/search/IndexedDbContactSearchFacadeTest.js"
Add SQLite search on clients where offline storage is available - Introduce a separate Indexer for SQLite using FTS5 - Split search backends and use the right one based on client (IndexedDB for Browser, and OfflineStorage everywhere else) - Split SearchFacade into two implementations - Adds a table for storing unindexed metadata for mails - Escape special character for SQLite search To escape special characters from fts5 syntax. However, simply surrounding each token in quotes is sufficient to do this. See section 3.1 "FTS5 Strings" here: https://www.sqlite.org/fts5.html which states that a string may be specified by surrounding it in quotes, and that special string requirements only exist for strings that are not in quotes. - Add EncryptedDbWrapper - Simplify out of sync logic in IndexedDbIndexer - Fix deadlock when initializing IndexedDbIndexer - Cleanup indexedDb index when migrating to offline storage index - Pass contactSuggestionFacade to IndexedDbSearchFacade The only suggestion facade used by IndexedDbSearchFacade was the contact suggestion facade. So we made it clearer. - Remove IndexerCore stats - Split custom cache handlers into separate files We were already doing this with user, so we should do this with the other entity types. - Rewrite IndexedDb tests - Add OfflineStorage indexer tests - Add custom cache handlers tests to OfflineStorageTest - Add tests for custom cache handlers with ephemeral storage - Use dbStub instead of dbMock in IndexedDbIndexerTest - Replace spy with testdouble in IndexedDbIndexerTest Close #8550 Co-authored-by: ivk <ivk@tutao.de> Co-authored-by: paw <paw-hub@users.noreply.github.com> Co-authored-by: wrd <wrd@tutao.de> Co-authored-by: bir <bir@tutao.de> Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
2025-03-13 16:37:55 +01:00
import "./api/worker/search/OfflineStorageContactIndexerBackendTest.js"
import "./api/worker/search/OfflineStorageContactSearchFacadeTest.js"
Add SQLite search on clients where offline storage is available - Introduce a separate Indexer for SQLite using FTS5 - Split search backends and use the right one based on client (IndexedDB for Browser, and OfflineStorage everywhere else) - Split SearchFacade into two implementations - Adds a table for storing unindexed metadata for mails - Escape special character for SQLite search To escape special characters from fts5 syntax. However, simply surrounding each token in quotes is sufficient to do this. See section 3.1 "FTS5 Strings" here: https://www.sqlite.org/fts5.html which states that a string may be specified by surrounding it in quotes, and that special string requirements only exist for strings that are not in quotes. - Add EncryptedDbWrapper - Simplify out of sync logic in IndexedDbIndexer - Fix deadlock when initializing IndexedDbIndexer - Cleanup indexedDb index when migrating to offline storage index - Pass contactSuggestionFacade to IndexedDbSearchFacade The only suggestion facade used by IndexedDbSearchFacade was the contact suggestion facade. So we made it clearer. - Remove IndexerCore stats - Split custom cache handlers into separate files We were already doing this with user, so we should do this with the other entity types. - Rewrite IndexedDb tests - Add OfflineStorage indexer tests - Add custom cache handlers tests to OfflineStorageTest - Add tests for custom cache handlers with ephemeral storage - Use dbStub instead of dbMock in IndexedDbIndexerTest - Replace spy with testdouble in IndexedDbIndexerTest Close #8550 Co-authored-by: ivk <ivk@tutao.de> Co-authored-by: paw <paw-hub@users.noreply.github.com> Co-authored-by: wrd <wrd@tutao.de> Co-authored-by: bir <bir@tutao.de> Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
2025-03-13 16:37:55 +01:00
import "./api/worker/rest/CustomUserCacheHandlerTest.js"
import "./api/common/utils/QueryTokenUtilsTest.js"
import "./api/worker/offline/PatchMergerTest.js"
import "./contacts/ContactModelTest.js"
import "./api/worker/search/OfflinestorageIndexerTest.js"
import "./api/worker/EventInstancePrefetcherTest.js"
Add SQLite search on clients where offline storage is available - Introduce a separate Indexer for SQLite using FTS5 - Split search backends and use the right one based on client (IndexedDB for Browser, and OfflineStorage everywhere else) - Split SearchFacade into two implementations - Adds a table for storing unindexed metadata for mails - Escape special character for SQLite search To escape special characters from fts5 syntax. However, simply surrounding each token in quotes is sufficient to do this. See section 3.1 "FTS5 Strings" here: https://www.sqlite.org/fts5.html which states that a string may be specified by surrounding it in quotes, and that special string requirements only exist for strings that are not in quotes. - Add EncryptedDbWrapper - Simplify out of sync logic in IndexedDbIndexer - Fix deadlock when initializing IndexedDbIndexer - Cleanup indexedDb index when migrating to offline storage index - Pass contactSuggestionFacade to IndexedDbSearchFacade The only suggestion facade used by IndexedDbSearchFacade was the contact suggestion facade. So we made it clearer. - Remove IndexerCore stats - Split custom cache handlers into separate files We were already doing this with user, so we should do this with the other entity types. - Rewrite IndexedDb tests - Add OfflineStorage indexer tests - Add custom cache handlers tests to OfflineStorageTest - Add tests for custom cache handlers with ephemeral storage - Use dbStub instead of dbMock in IndexedDbIndexerTest - Replace spy with testdouble in IndexedDbIndexerTest Close #8550 Co-authored-by: ivk <ivk@tutao.de> Co-authored-by: paw <paw-hub@users.noreply.github.com> Co-authored-by: wrd <wrd@tutao.de> Co-authored-by: bir <bir@tutao.de> Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
2025-03-13 16:37:55 +01:00
import * as td from "testdouble"
2023-01-12 16:48:28 +01:00
import { random } from "@tutao/tutanota-crypto"
import { Mode } from "../../src/common/api/common/Env.js"
2023-06-29 18:26:45 +02:00
export async function run({ integration, filter }: { integration?: boolean; filter?: string } = {}) {
await setupSuite({ integration })
const result = await o.run({ filter })
2023-06-29 18:26:45 +02:00
o.printReport(result)
2023-06-29 18:26:45 +02:00
return result
}
2023-06-29 18:26:45 +02:00
async function setupSuite({ integration }: { integration?: boolean }) {
const { WorkerImpl } = await import("../../src/mail-app/workerUtils/worker/WorkerImpl.js")
globalThis.testWorker = WorkerImpl
if (typeof process !== "undefined") {
2023-06-29 18:26:45 +02:00
if (integration) {
console.log("\nRunning with integration tests because was run with -i\n")
await import("./api/main/WorkerTest.js")
await import("./IntegrationTest.js")
} else {
console.log("\nRunning without integration tests because run without -i\n")
}
}
if (typeof process !== "undefined") {
// setup the Entropy for all testcases
2023-01-12 16:48:28 +01:00
await random.addEntropy([{ data: 36, entropy: 256, source: "key" }])
await import("./api/worker/offline/OfflineStorageMigratorTest.js")
await import("./api/worker/offline/OfflineStorageTest.js")
await import("./api/worker/rest/RestClientTest.js")
await import("./desktop/ApplicationWindowTest.js")
await import("./desktop/DesktopContextMenuTest.js")
await import("./desktop/DesktopCryptoFacadeTest.js")
2023-11-09 13:30:55 +01:00
await import("./desktop/DesktopKeyStoreFacadeTest.js")
await import("./desktop/notifications/DesktopNotifierTest.js")
await import("./desktop/notifications/WindowsNotificationFactoryTest.js")
await import("./desktop/ElectronUpdaterTest.js")
await import("./desktop/PathUtilsTest.js")
await import("./desktop/SocketeerTest.js")
2022-12-27 15:37:40 +01:00
await import("./desktop/config/ConfigFileTest.js")
await import("./desktop/config/DesktopConfigTest.js")
await import("./desktop/config/migrations/DesktopConfigMigratorTest.js")
await import("./desktop/credentials/AppPassHandlerTest.js")
await import("./desktop/credentials/DesktopCredentialsStorageTest.js")
await import("./desktop/credentials/DesktopNativeCredentialsFacadeTest.js")
await import("./desktop/credentials/KeychainEncryptionTest.js")
await import("./desktop/db/OfflineDbFacadeTest.js")
await import("./desktop/export/DesktopExportFacadeTest.js")
await import("./desktop/files/DesktopFileFacadeTest.js")
await import("./desktop/files/TempFsTest.js")
await import("./desktop/files/TempFsTest.js")
await import("./desktop/integration/DesktopIntegratorTest.js")
await import("./desktop/integration/RegistryScriptGeneratorTest.js")
await import("./desktop/net/ProtocolProxyTest.js")
await import("./desktop/sse/DesktopAlarmSchedulerTest.js")
await import("./desktop/sse/DesktopAlarmStorageTest.js")
await import("./desktop/sse/SecretStorageTest.js")
await import("./desktop/sse/SseClientTest.js")
await import("./desktop/sse/TutaNotificationHandlerTest.js")
await import("./desktop/sse/TutaSseFacadeTest.js")
await import("./api/worker/search/OfflineStorageMailIndexerBackendTest.js")
await import("./api/worker/search/OfflineStoragePersistenceTest.js")
await import("./api/worker/search/OfflineStorageSearchFacadeTest.js")
}
// testdouble complains about certain mocking related code smells, and also prints a warning whenever you replace a property on an object.
// it's very very noisy, so we turn it off
td.config({
2022-12-27 15:37:40 +01:00
ignoreWarnings: true,
})
o.before(async function () {
// setup the Entropy for all testcases
2023-01-12 16:48:28 +01:00
await random.addEntropy([{ data: 36, entropy: 256, source: "key" }])
})
o.afterEach(function () {
td.reset()
2023-06-29 18:26:45 +02:00
// Reset env.mode in case any tests have fiddled with it
env.mode = Mode.Test
})
}