Skip to content

Commit

Permalink
test(ses): module source descriptor tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Jul 11, 2024
1 parent 2c68876 commit 3147a5d
Showing 1 changed file with 22 additions and 25 deletions.
47 changes: 22 additions & 25 deletions packages/ses/test/import.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test('module map primed with module record descriptor', async t => {
t.is(index.default, 42);
});

test.failing('module map primed with module source descriptor', async t => {
test('module map primed with module source descriptor', async t => {
const compartment = new Compartment(
// endowments:
{},
Expand Down Expand Up @@ -112,33 +112,30 @@ test('module map primed with virtual module record descriptor', async t => {
t.is(index.default, 42);
});

test.failing(
'module map primed with virtual module source descriptor',
async t => {
const compartment = new Compartment(
// endowments:
{},
// modules:
{
'./index.js': {
source: {
imports: [],
exports: ['default'],
execute(env) {
env.default = 42;
},
test('module map primed with virtual module source descriptor', async t => {
const compartment = new Compartment(
// endowments:
{},
// modules:
{
'./index.js': {
source: {
imports: [],
exports: ['default'],
execute(env) {
env.default = 42;
},
},
},
// options:
{
resolveHook: specifier => specifier,
},
);
const { namespace: index } = await compartment.import('./index.js');
t.is(index.default, 42);
},
);
},
// options:
{
resolveHook: specifier => specifier,
},
);
const { namespace: index } = await compartment.import('./index.js');
t.is(index.default, 42);
});

test('module map hook returns module source', async t => {
const compartment = new Compartment(
Expand Down

0 comments on commit 3147a5d

Please sign in to comment.