Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to import - Blob and File from Node_Buffer #574

Closed
jcc10 opened this issue Mar 30, 2023 · 0 comments
Closed

Failed to import - Blob and File from Node_Buffer #574

jcc10 opened this issue Mar 30, 2023 · 0 comments
Labels
deno Not working in Deno

Comments

@jcc10
Copy link
Contributor

jcc10 commented Mar 30, 2023

Failing module

import { assertNotEquals } from "https://deno.land/[email protected]/testing/asserts.ts";
import __14$ from "http://localhost:8080/v113/node_buffer.js";

Deno.test("node-buffer-file", () => {
    const { File } = __14$;
    assertNotEquals(typeof File, "undefined", "Missing File class in node.js api buffer");
});

Deno.test("node-buffer-blob", () => {
    const { Blob } = __14$;
    assertNotEquals(typeof Blob, "undefined", "Missing Blob class in node.js api buffer.");
});

Error message

After running deno run I got this:

deno test -Ar ./test/node-buffer/node-buffer.test.ts 
Check file:///home/digitalkitsune/github/esm.sh/test/node-buffer/node-buffer.test.ts
running 2 tests from ./test/node-buffer/node-buffer.test.ts
node-buffer-file ... FAILED (11ms)
node-buffer-blob ... FAILED (6ms)

 ERRORS 

node-buffer-file => ./test/node-buffer/node-buffer.test.ts:4:6
error: AssertionError: Missing File class in node.js api buffer
  throw new AssertionError(msg);
        ^
    at assertNotEquals (https://deno.land/[email protected]/testing/asserts.ts:225:9)
    at file:///home/digitalkitsune/github/esm.sh/test/node-buffer/node-buffer.test.ts:6:5

node-buffer-blob => ./test/node-buffer/node-buffer.test.ts:9:6
error: AssertionError: Missing Blob class in node.js api buffer.
  throw new AssertionError(msg);
        ^
    at assertNotEquals (https://deno.land/[email protected]/testing/asserts.ts:225:9)
    at file:///home/digitalkitsune/github/esm.sh/test/node-buffer/node-buffer.test.ts:11:5

 FAILURES 

node-buffer-file => ./test/node-buffer/node-buffer.test.ts:4:6
node-buffer-blob => ./test/node-buffer/node-buffer.test.ts:9:6

FAILED | 0 passed | 2 failed (56ms)

error: Test failed

Additional info

@jcc10 jcc10 added the deno Not working in Deno label Mar 30, 2023
@ije ije closed this as completed in 348316e Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deno Not working in Deno
Projects
None yet
Development

No branches or pull requests

1 participant