File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22'use strict' ;
33
44const common = require ( '../common' ) ;
5- const assert = require ( 'assert' ) ;
65common . skipIfSQLiteMissing ( ) ;
76common . skipIfInspectorDisabled ( ) ;
7+ const tmpdir = require ( '../common/tmpdir' ) ;
8+ tmpdir . refresh ( ) ;
9+ // Change cwd to tmpdir so that --localstorage-file=./localstorage.db resolves there.
10+ process . chdir ( tmpdir . path ) ;
11+
12+ const assert = require ( 'assert' ) ;
813const { DOMStorage, Session } = require ( 'node:inspector/promises' ) ;
914const { pathToFileURL } = require ( 'node:url' ) ;
1015const path = require ( 'node:path' ) ;
@@ -16,7 +21,7 @@ async function testRegisterStorage() {
1621 await session . post ( 'DOMStorage.enable' ) ;
1722
1823 const localStorageFileUrl =
19- pathToFileURL ( path . join ( process . cwd ( ) , 'localstorage.db' ) ) . href ;
24+ pathToFileURL ( path . join ( tmpdir . path , 'localstorage.db' ) ) . href ;
2025
2126 const { storageKey } = await session . post ( 'Storage.getStorageKey' ) ;
2227 assert . strictEqual (
You can’t perform that action at this time.
0 commit comments