Skip to content

Commit

Permalink
Update blob-impl.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ArpanSolanki29 committed Apr 22, 2024
1 parent d7a2a96 commit ec1073e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/blob-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@
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 TextDecoder = require("util").TextDecoder;
const BlobImpl = require("../../lib/jsdom/living/file-api/Blob-impl.js");
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 => {
const globalObject = {};
const blobData = "Hello World";
const blobPros = { type: "text/plain" };
const blob = new BlobImpl(globalObject, [[blobData], blobPros], {});
const blob = new BlobImpl.implementation(globalObject, [[blobData], blobPros], {});

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

View workflow job for this annotation

GitHub Actions / Lint

A constructor name should not start with a lowercase letter

blob
.text()
.then((text) => {
blob.text().then(text => {
assert.strictEqual(text, blobData, 'Blob text should be "Hello World"');

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

View workflow job for this annotation

GitHub Actions / Lint

Expected indentation of 6 spaces but found 8
done();

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

View workflow job for this annotation

GitHub Actions / Lint

Expected indentation of 6 spaces but found 8
})

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

View workflow job for this annotation

GitHub Actions / Lint

Expected indentation of 4 spaces but found 6
Expand Down

0 comments on commit ec1073e

Please sign in to comment.