mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 11:47:54 +01:00
core: fix sync tests and remove obsolete snapshots
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`get offer code > offer-code 1`] = `"123"`;
|
||||
|
||||
exports[`get offer code > offer-code 2`] = `"123"`;
|
||||
|
||||
@@ -63,15 +63,6 @@ exports[`get web pricing tier > get monthly web tier > monthly-web-pricing 1`] =
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`get web pricing tier > get monthly web tier > yearly-ios-pricing 1`] = `
|
||||
{
|
||||
"country": Any<String>,
|
||||
"countryCode": Any<String>,
|
||||
"discount": Any<Number>,
|
||||
"sku": Any<String>,
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`get web pricing tier > get yearly web tier > yearly-web-pricing 1`] = `
|
||||
{
|
||||
"country": Any<String>,
|
||||
@@ -81,15 +72,6 @@ exports[`get web pricing tier > get yearly web tier > yearly-web-pricing 1`] = `
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`get yearly price > monthly-pricing 1`] = `
|
||||
{
|
||||
"country": Any<String>,
|
||||
"countryCode": Any<String>,
|
||||
"discount": Any<Number>,
|
||||
"price": Any<Number>,
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`get yearly price > yearly-pricing 1`] = `
|
||||
{
|
||||
"country": Any<String>,
|
||||
|
||||
@@ -17,16 +17,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Database from "../src/api/index.ts";
|
||||
import { NodeStorageInterface } from "../__mocks__/node-storage.mock.ts";
|
||||
import { FS } from "../__mocks__/fs.mock.ts";
|
||||
import Compressor from "../__mocks__/compressor.mock.js";
|
||||
import { CHECK_IDS, EV, EVENTS } from "../src/common.ts";
|
||||
import { EventSource } from "event-source-polyfill";
|
||||
import { test, expect, vitest } from "vitest";
|
||||
import { login } from "./utils.js";
|
||||
import { SqliteDialect } from "@streetwriters/kysely";
|
||||
import BetterSQLite3 from "better-sqlite3-multiple-ciphers";
|
||||
import { databaseTest } from "../__tests__/utils/index.ts";
|
||||
|
||||
const TEST_TIMEOUT = 60 * 1000;
|
||||
|
||||
@@ -499,22 +493,7 @@ async function initializeDevice(id, capabilities = []) {
|
||||
};
|
||||
});
|
||||
|
||||
const device = new Database();
|
||||
device.setup({
|
||||
storage: new NodeStorageInterface(),
|
||||
eventsource: EventSource,
|
||||
fs: FS,
|
||||
compressor: async () => Compressor,
|
||||
sqliteOptions: {
|
||||
dialect: (name) =>
|
||||
new SqliteDialect({
|
||||
database: BetterSQLite3(":memory:").unsafeMode(true)
|
||||
})
|
||||
},
|
||||
batchSize: 500
|
||||
});
|
||||
|
||||
await device.init();
|
||||
const device = await databaseTest("memory");
|
||||
|
||||
await login(device);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user