forked from softprops/action-gh-release
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): bump prettier from 2.8.0 to 3.3.3 (softprops#480)
- Loading branch information
Showing
3 changed files
with
397 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bar |
Oops, something went wrong.