Bit.Bsqlite.Testing
11.0.0-pre-10
dotnet add package Bit.Bsqlite.Testing --version 11.0.0-pre-10
NuGet\Install-Package Bit.Bsqlite.Testing -Version 11.0.0-pre-10
<PackageReference Include="Bit.Bsqlite.Testing" Version="11.0.0-pre-10" />
<PackageVersion Include="Bit.Bsqlite.Testing" Version="11.0.0-pre-10" />
<PackageReference Include="Bit.Bsqlite.Testing" />
paket add Bit.Bsqlite.Testing --version 11.0.0-pre-10
#r "nuget: Bit.Bsqlite.Testing, 11.0.0-pre-10"
#:package Bit.Bsqlite.Testing@11.0.0-pre-10
#addin nuget:?package=Bit.Bsqlite.Testing&version=11.0.0-pre-10&prerelease
#tool nuget:?package=Bit.Bsqlite.Testing&version=11.0.0-pre-10&prerelease
Bit.Bsqlite.Testing
Test support for bit Bsqlite. Two things live here.
dotnet add package Bit.Bsqlite.Testing
1. Run the stack without a browser
BsqliteInProcessTransport is an IBsqliteTransport backed by Microsoft.Data.Sqlite that
stands in for the web-worker transport, so EF Core mappings, migrations, generated SQL, and live
queries can be tested on desktop .NET.
await using var transport = new BsqliteInProcessTransport();
await using var connection = new BsqliteConnection(transport, "test.db");
await connection.OpenAsync();
options.UseBitBsqlite(connection);
// after the act
Assert.Contains("CREATE TABLE", transport.ExecutedCommands[0]);
It mirrors the worker's responsibilities rather than approximating them. It installs the EF function
set, which matters more than it sounds: EF's SQLite provider registers its scalar functions,
aggregates, and collation only when the connection is literally a SqliteConnection; against any
other DbConnection it logs a warning and moves on. Bsqlite supplies its own connection, so it
inherits that obligation, and BsqliteFunctions is the reference implementation the
worker-side UDF host matches. Pass registerEfFunctions: false to see what breaks without it. And
it reports writes the way the worker does - from SQLite's update hook, cascades and triggers
included, once the transaction that made them commits - so live queries behave on desktop
exactly as they do in the browser.
2. The storage conformance kit
If you are writing a storage backend, this is how you prove it works. Inherit the suites in your own test project and hand them your provider:
[TestClass]
public sealed class MyBackendConformanceTests : BsqliteStorageProviderConformanceTests
{
protected override IBsqliteStorageProvider CreateProvider() => new MyStorageProvider();
}
The core trusts IBsqliteStorageProvider.Capabilities without verifying it — selection, pragma
guarding, and durability options are all driven by what a backend claims. The kit is what makes
that trust reasonable.
BsqliteStorageProviderConformanceTests— everything checkable without a running engine: are the declared capabilities internally coherent, does the admin surface behave the way cross-provider migration assumes.BsqliteStorageEngineConformanceTests— the claims only a real database can settle: write atomicity, crash safety, concurrency levels. Needs the worker host.
Providers that cannot run in the current environment report the test inconclusive with an explanation rather than failing, so the same suite is meaningful on desktop and in a browser.
Built on MSTest: the derived classes need [TestClass], and the kit's test methods come with the base
class. MIT. Part of bit Bsqlite.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- Bit.Bsqlite (>= 11.0.0-pre-10)
- Microsoft.Data.Sqlite (>= 10.0.0 && < 11.0.0)
- MSTest.TestFramework (>= 4.5.1 && < 5.0.0)
- SQLitePCLRaw.bundle_e_sqlite3 (>= 2.1.13 && < 3.0.0)
-
net11.0
- Bit.Bsqlite (>= 11.0.0-pre-10)
- Microsoft.Data.Sqlite (>= 11.0.0-rc.1.26425.128 && < 12.0.0)
- MSTest.TestFramework (>= 4.5.1 && < 5.0.0)
- SQLitePCLRaw.bundle_e_sqlite3 (>= 3.0.5 && < 4.0.0)
-
net8.0
- Bit.Bsqlite (>= 11.0.0-pre-10)
- Microsoft.Data.Sqlite (>= 8.0.11 && < 9.0.0)
- MSTest.TestFramework (>= 4.5.1 && < 5.0.0)
- SQLitePCLRaw.bundle_e_sqlite3 (>= 2.1.13 && < 3.0.0)
-
net9.0
- Bit.Bsqlite (>= 11.0.0-pre-10)
- Microsoft.Data.Sqlite (>= 9.0.0 && < 10.0.0)
- MSTest.TestFramework (>= 4.5.1 && < 5.0.0)
- SQLitePCLRaw.bundle_e_sqlite3 (>= 2.1.13 && < 3.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-pre-10 | 49 | 10/18/2026 |