node/test/parallel/test-webstorage-without-sqlite.js
Antoine du Hamel 0bb8f5fe03
lib,src,test: fix tests without SQLite
PR-URL: https://github.com/nodejs/node/pull/60906
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-01-27 22:50:36 +01:00

10 lines
425 B
JavaScript

'use strict';
// Flags: --experimental-webstorage --localstorage-file=./test/fixtures/empty.js
const { hasSQLite } = require('../common');
const assert = require('node:assert');
// Ensuring that `sessionStorage` is not a getter that throws when built without SQLite.
assert.strictEqual(typeof sessionStorage, hasSQLite ? 'object' : 'undefined');
assert.strictEqual(Object.hasOwn(globalThis, 'sessionStorage'), hasSQLite);