1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-09-25 21:08:59 +02:00
Files
flexsearch/test/persistent.sqlite.js
Thomas Wilkerling c852a07de3 fix github action
2025-05-21 15:42:55 +02:00

21 lines
831 B
JavaScript

global.self = global;
const env = process.argv[process.argv.length - 1];
import { expect } from "chai";
let FlexSearch = await import(env ? "../dist/" + env + ".js" : "../src/bundle.js");
if(FlexSearch.default) FlexSearch = FlexSearch.default;
if(FlexSearch.FlexSearch) FlexSearch = FlexSearch.FlexSearch;
const { Index, Document, Worker, Charset: _Charset, Encoder, Resolver } = FlexSearch;
const build_light = env && env.includes(".light");
const build_compact = env && env.includes(".compact");
const build_esm = !env || env.startsWith("module");
const Charset = _Charset || (await import("../src/charset.js")).default;
import SQLite from "flexsearch/db/sqlite";
import tests from "./persistent.js";
if(!build_light && !build_compact){
describe("Persistent: SQLite", function(){
tests(SQLite, "SQLite");
});
}