Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,15 @@
// This fixture is used to test that custom loaders are not enabled in the ShadowRealm.
'use strict';
const assert = require('assert');
async function workInChildProcess() {
// Assert that the process is running with a custom loader.
const moduleNamespace = await import('file:///42.mjs');
assert.strictEqual(moduleNamespace.default, 42);
const realm = new ShadowRealm();
await assert.rejects(realm.importValue('file:///42.mjs', 'default'), TypeError);
}
workInChildProcess();

View File

@ -0,0 +1,9 @@
// This fixture is used to test that --require preload modules are not enabled in the ShadowRealm.
'use strict';
const assert = require('assert');
assert.strictEqual(globalThis.preload, 42);
const realm = new ShadowRealm();
const value = realm.evaluate(`globalThis.preload`);
assert.strictEqual(value, undefined);

View File

@ -0,0 +1 @@
globalThis.preload = 42;

View File

@ -0,0 +1,3 @@
// This module verifies that the module specifier is resolved relative to the
// current module and not the current working directory in the ShadowRealm.
export { getCounter } from "./state-counter.mjs";

View File

@ -0,0 +1,4 @@
let counter = 0;
export const getCounter = () => {
return counter++;
};