Skip to content

Commit 3a72667

Browse files
ryuhei shimaryuhei shima
authored andcommitted
skip test if SQLite missinig
1 parent 5c82977 commit 3a72667

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/parallel/test-inspector-dom-storage.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
const common = require('../common');
55
const assert = require('assert');
6+
common.skipIfSQLiteMissing();
67
common.skipIfInspectorDisabled();
78
const { DOMStorage, Session } = require('node:inspector/promises');
89
const { pathToFileURL } = require('node:url');
@@ -35,6 +36,7 @@ async function testRegisterStorage() {
3536
key2: 'value2',
3637
[1]: 2,
3738
[true]: 'booleanKey',
39+
['ключ']: 'значение',
3840
},
3941
});
4042
const result = await session.post('DOMStorage.getDOMStorageItems', {
@@ -51,6 +53,7 @@ async function testRegisterStorage() {
5153
['key1', 'value1'],
5254
['key2', 'value2'],
5355
['true', 'booleanKey'],
56+
['ключ', 'значение'],
5457
]);
5558
}
5659
}
@@ -71,6 +74,7 @@ async function testGetData() {
7174
webStorage.setItem('key1', 'value');
7275
webStorage.setItem('key2', 1);
7376
webStorage.setItem('key3', JSON.stringify({ a: 1 }));
77+
webStorage.setItem('ключ', 'значение');
7478

7579
const result = await session.post('DOMStorage.getDOMStorageItems', {
7680
storageId: {
@@ -79,11 +83,12 @@ async function testGetData() {
7983
storageKey: storageKey.storageKey,
8084
},
8185
});
82-
assert.strictEqual(result.entries.length, 3);
86+
assert.strictEqual(result.entries.length, 4);
8387
const entries = Object.fromEntries(result.entries);
8488
assert.strictEqual(entries.key1, 'value');
8589
assert.strictEqual(entries.key2, '1');
8690
assert.strictEqual(entries.key3, JSON.stringify({ a: 1 }));
91+
assert.strictEqual(entries['ключ'], 'значение');
8792
session.disconnect();
8893
}
8994
}

0 commit comments

Comments
 (0)