Ensure tests have default-initialized settings (#4498)

Also rework HighlightController test directory creation/saving to ensure the test directory is written to & cleaned up appropriately
This commit is contained in:
pajlada
2023-04-01 13:23:18 +02:00
committed by GitHub
parent 7a081fdcfb
commit 0177ab4829
4 changed files with 16 additions and 9 deletions
+4
View File
@@ -4,6 +4,7 @@
#include "common/Outcome.hpp"
#include "common/QLogging.hpp"
#include "providers/twitch/api/Helix.hpp"
#include "singletons/Settings.hpp"
#include <gtest/gtest.h>
#include <QApplication>
@@ -27,6 +28,9 @@ int main(int argc, char **argv)
chatterino::NetworkManager::init();
// Ensure settings are initialized before any tests are run
chatterino::Settings settings("/tmp/c2-empty-test");
QtConcurrent::run([&app] {
auto res = RUN_ALL_TESTS();