Skip to content

Commit af0421b

Browse files
Merge pull request #442 from M393/fix-test-on-windows
2 parents 6124858 + adf3998 commit af0421b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/geotiff.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import serveStatic from 'serve-static';
66
import finalhandler from 'finalhandler';
77
import AbortController from 'node-abort-controller';
88
import { dirname } from 'path';
9+
import { fileURLToPath } from 'url';
910

1011
import { GeoTIFF, fromArrayBuffer, writeArrayBuffer, fromUrls, Pool } from '../dist-module/geotiff.js';
1112
import { makeFetchSource } from '../dist-module/source/remote.js';
@@ -15,9 +16,9 @@ import { chunk, toArray, toArrayRecursively, range } from '../dist-module/utils.
1516
import DataSlice from '../dist-module/dataslice.js';
1617
import DataView64 from '../dist-module/dataview64.js';
1718

18-
const __dirname = dirname(new URL(import.meta.url).pathname);
19+
const __dirname = dirname(fileURLToPath(import.meta.url));
1920

20-
// Set up a node server to make tiffs available at localhost:3000/test/data, and a worker pool
21+
// Set up a node server to make tiffs available at localhost:3000/data, and a worker pool
2122
let server = null;
2223
let pool = null;
2324
before(async () => {

0 commit comments

Comments
 (0)