Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions test/parallel/test-inspector-dom-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
'use strict';

const common = require('../common');
const assert = require('assert');
common.skipIfSQLiteMissing();
common.skipIfInspectorDisabled();
const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
// Change cwd to tmpdir so that --localstorage-file=./localstorage.db resolves there.
process.chdir(tmpdir.path);

const assert = require('assert');
const { DOMStorage, Session } = require('node:inspector/promises');
const { pathToFileURL } = require('node:url');
const path = require('node:path');
Expand All @@ -16,7 +21,7 @@ async function testRegisterStorage() {
await session.post('DOMStorage.enable');

const localStorageFileUrl =
pathToFileURL(path.join(process.cwd(), 'localstorage.db')).href;
pathToFileURL(path.join(tmpdir.path, 'localstorage.db')).href;

const { storageKey } = await session.post('Storage.getStorageKey');
assert.strictEqual(
Expand Down
Loading