Skip to content

Commit 6a4ce9f

Browse files
committed
test: include test for new --no-experimental-webstorage flag
1 parent f075423 commit 6a4ce9f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/parallel/test-webstorage.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,14 @@ describe('webstorage quota for localStorage and sessionStorage', () => {
114114
assert.match(cp.stderr, /QuotaExceededError/);
115115
});
116116
});
117+
118+
test('disabled with --no-experimental-webstorage', async () => {
119+
for (const api of ['Storage', 'localStorage', 'sessionStorage']) {
120+
const cp = await spawnPromisified(process.execPath, ['--no-experimental-webstorage', '-e', api]);
121+
122+
assert.strictEqual(cp.code, 1);
123+
assert.strictEqual(cp.signal, null);
124+
assert.strictEqual(cp.stdout, '');
125+
assert(cp.stderr.includes(`ReferenceError: ${api} is not defined`));
126+
}
127+
});

0 commit comments

Comments
 (0)