Skip to content

Commit

Permalink
test: blob-impl: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ArpanSolanki29 committed Apr 22, 2024
1 parent ec1073e commit 292366b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/blob-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
const assert = require("node:assert/strict");
const { describe, it } = require("mocha-sugar-free");

const BlobImpl = require("../../lib/jsdom/living/file-api/Blob-impl.js");
const BlobImpl =
require("../../lib/jsdom/living/file-api/Blob-impl.js").implementation;
const { TextDecoder } = require("util");
global.TextDecoder = TextDecoder;

describe("File-API: Blob-impl.js", () => {
it("should return correct test from the blob", done => {
it("should return correct test from the blob", (done) => {

Check failure on line 11 in test/blob-impl.js

View workflow job for this annotation

GitHub Actions / Lint

Unexpected parentheses around single function argument
const globalObject = {};
const blobData = "Hello World";
const blobPros = { type: "text/plain" };
const blob = new BlobImpl.implementation(globalObject, [[blobData], blobPros], {});
const blob = new BlobImpl(globalObject, [[blobData], blobPros], {});

blob.text().then(text => {
blob
.text()
.then((text) => {

Check failure on line 19 in test/blob-impl.js

View workflow job for this annotation

GitHub Actions / Lint

Unexpected parentheses around single function argument
assert.strictEqual(text, blobData, 'Blob text should be "Hello World"');
done();
})
Expand Down

0 comments on commit 292366b

Please sign in to comment.