Skip to content

Commit

Permalink
fix: renamed to attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito committed Oct 14, 2023
1 parent d471633 commit 27c59a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/fetch_module.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function fetchWithRedirects(parsed, context) {
}
const handler = parsed.protocol === 'http:' ? HTTPGet : HTTPSGet;
const result = (async () => {
const type = context.importAssertions?.type;
const type = context.importAttributes?.type;
const req = handler(parsed, {
headers: { Accept: type === 'json' ? 'application/json,*/*;q=0.5' : '*/*;' },
});
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-http-imports.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ for (const { protocol, createServer } of [
const jsonUrl = new URL(url.href + 'json');
jsonUrl.searchParams.set('mime', 'application/json');
jsonUrl.searchParams.set('body', '{"x": 1}');
const json = await import(jsonUrl.href, { assert: { type: 'json' } });
const json = await import(jsonUrl.href, { with: { type: 'json' } });
assert.deepStrictEqual(Object.keys(json), ['default']);
assert.strictEqual(json.default.x, 1);

Expand Down

0 comments on commit 27c59a3

Please sign in to comment.