Skip to content

Commit

Permalink
chore(deps): bump prettier from 2.8.0 to 3.3.3 (softprops#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
hqnicolas committed Nov 7, 2024
1 parent 7354a17 commit 25eab78
Show file tree
Hide file tree
Showing 3 changed files with 397 additions and 0 deletions.
25 changes: 25 additions & 0 deletions __tests__/github.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//import * as assert from "assert";
//const assert = require('assert');
import * as assert from "assert";
import { mimeOrDefault, asset } from "../src/github";

describe("github", () => {
describe("mimeOrDefault", () => {
it("returns a specific mime for common path", async () => {
assert.equal(mimeOrDefault("foo.tar.gz"), "application/gzip");
});
it("returns default mime for uncommon path", async () => {
assert.equal(mimeOrDefault("foo.uncommon"), "application/octet-stream");
});
});

describe("asset", () => {
it("derives asset info from a path", async () => {
const { name, mime, size, data } = asset("tests/data/foo/bar.txt");
assert.equal(name, "bar.txt");
assert.equal(mime, "text/plain");
assert.equal(size, 10);
assert.equal(data.toString(), "release me");
});
});
});
1 change: 1 addition & 0 deletions __tests__/release.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bar
Loading

0 comments on commit 25eab78

Please sign in to comment.