Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ console.log(htmlExample.mimeType.toString()); // "text/html"
console.log(htmlExample.body); // Uint8Array(22) [ 60, 104, 49, 62, 72, 101, … ]

const pngExample = parseDataURL(
"data:image/png;base64,iVBORw0KGgoAAA" +
"ANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4" +
"//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU" +
"5ErkJggg==",
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
);
console.log(pngExample.mimeType.toString()); // "image/png"
console.log(pngExample.body); // Uint8Array(85) [ 137, 80, 78, 71, 13, 10, … ]
Expand Down
4 changes: 1 addition & 3 deletions scripts/get-latest-platform-tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ if (process.env.NO_UPDATE) {
// 3. Copy the commit hash
const commitHash = "2dc0ad4f330f0b5647d11b00ae7437b668cb8df3";

const urlPrefix =
`https://raw.githubusercontent.com/w3c/web-platform-tests/${commitHash}` +
`/fetch/data-urls/resources/`;
const urlPrefix = `https://raw.githubusercontent.com/w3c/web-platform-tests/${commitHash}/fetch/data-urls/resources/`;

const files = ["base64.json", "data-urls.json"];

Expand Down
5 changes: 1 addition & 4 deletions test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ describe("Smoke tests via README examples", () => {

it("should parse img/png base64 as expected", () => {
const pngExample = parseDataURL(
"data:image/png;base64,iVBORw0KGgoAAA" +
"ANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4" +
"//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU" +
"5ErkJggg==",
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
);
assert.equal(pngExample.mimeType.toString(), "image/png");
assert.equal(pngExample.body.constructor, Uint8Array);
Expand Down
Loading