Convert buffer to string

This commit is contained in:
Sebass van Boxel 2020-11-06 09:38:38 +01:00
parent f3bbb83000
commit f6651c5728
No known key found for this signature in database
GPG key ID: A1E93D1FBDF515B7
2 changed files with 3 additions and 3 deletions

View file

@ -100,7 +100,7 @@ describe("updateComment", () => {
it("without comment body and previousbody", async() => {
expect(
await updateComment(octokit, repo, 456, "", "")
await updateComment(octokit, repo, 456, "", null)
).toBeUndefined();
expect(octokit.issues.updateComment).not.toBeCalled();
expect(core.warning).toBeCalledWith('Comment body cannot be blank');
@ -136,7 +136,7 @@ describe("createComment", () => {
})
it("without comment body and previousBody", async () => {
expect(
await createComment(octokit, repo, 456, "", "")
await createComment(octokit, repo, 456, "", null)
).toBeUndefined();
expect(octokit.issues.createComment).not.toBeCalled();
expect(core.warning).toBeCalledWith('Comment body cannot be blank');

View file

@ -35,7 +35,7 @@ async function run() {
let body;
if (path) {
body = readFileSync(path);
body = readFileSync(path, 'utf-8');
} else {
body = message;
}