fix(nat): Thread Windows read powers
MODIFY
packages/nat/test/test-endo.js
packages/nat/test/test-endo.js
import 'ses';
import fs from 'fs';
import test from 'ava';
+import url from 'url';
import { importLocation } from '@endo/compartment-mapper';
+import { makeReadPowers } from '@endo/compartment-mapper/node-powers.js';
+const readPowers = makeReadPowers({ fs, url });
const entry = new URL('../src/index.js', import.meta.url).toString();
-const read = async location => fs.promises.readFile(new URL(location).pathname);
-
test('endo can import nat', async t => {
const {
namespace: { isNat },
- } = await importLocation(read, entry);
+ } = await importLocation(readPowers, entry);
t.assert(isNat(0n));
});

fix(nat): Thread Windows read powers