We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a547a9c commit 58159caCopy full SHA for 58159ca
test/url-cwd.ts
@@ -0,0 +1,15 @@
1
+import t from 'tap'
2
+import {pathToFileURL} from 'url'
3
+import {Glob} from '../'
4
+
5
+t.test('can use file url as cwd option', t => {
6
+ const fileURL = pathToFileURL(process.cwd())
7
+ const fileURLString = String(fileURL)
8
+ const ps = new Glob('.', { cwd: process.cwd()})
9
+ const pu = new Glob('.', { cwd: fileURL })
10
+ const pus = new Glob('.', { cwd: fileURLString })
11
+ t.equal(ps.cwd, process.cwd())
12
+ t.equal(pu.cwd, process.cwd())
13
+ t.equal(pus.cwd, process.cwd())
14
+ t.end()
15
+})
0 commit comments