Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3529997
D7103.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
658 B
Referenced Files
None
Subscribers
None
D7103.diff
View Options
diff --git a/web/database/sql-js.test.js b/web/database/sql-js.test.js
new file mode 100644
--- /dev/null
+++ b/web/database/sql-js.test.js
@@ -0,0 +1,19 @@
+// @flow
+
+import initSqlJs from 'sql.js';
+
+import { getSQLiteDBVersion } from './queries/db-queries.js';
+
+describe('sql.js', () => {
+ it('should construct a Database', async () => {
+ const SQL = await initSqlJs();
+ const db = new SQL.Database();
+ expect(db).not.toBe(undefined);
+ });
+
+ it('should return default database version', async () => {
+ const SQL = await initSqlJs();
+ const db = new SQL.Database();
+ expect(getSQLiteDBVersion(db)).toBe(0);
+ });
+});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 10:43 PM (11 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2703349
Default Alt Text
D7103.diff (658 B)
Attached To
Mode
D7103: [web-db] add unit tests for `sql.js`
Attached
Detach File
Event Timeline
Log In to Comment