From 430e461169abb4cf88613e184a96ae4809552674 Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Wed, 13 Nov 2019 15:57:48 -0500 Subject: [PATCH] Fix file size on ubuntu and test name --- __tests__/__fixtures__/helloWorld.txt | 2 +- __tests__/actionUtils.test.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/__tests__/__fixtures__/helloWorld.txt b/__tests__/__fixtures__/helloWorld.txt index 3b18e51..95d09f2 100644 --- a/__tests__/__fixtures__/helloWorld.txt +++ b/__tests__/__fixtures__/helloWorld.txt @@ -1 +1 @@ -hello world +hello world \ No newline at end of file diff --git a/__tests__/actionUtils.test.ts b/__tests__/actionUtils.test.ts index 476ed11..05ee87d 100644 --- a/__tests__/actionUtils.test.ts +++ b/__tests__/actionUtils.test.ts @@ -1,4 +1,5 @@ import * as core from "@actions/core"; +import * as fs from "fs"; import * as os from "os"; import * as path from "path"; @@ -18,7 +19,7 @@ test("getArchiveFileSize returns file size", () => { const size = actionUtils.getArchiveFileSize(filePath); - expect(size).toBe(13); + expect(size).toBe(11); }); test("isExactKeyMatch with undefined cache entry returns false", () => { @@ -28,7 +29,7 @@ test("isExactKeyMatch with undefined cache entry returns false", () => { expect(actionUtils.isExactKeyMatch(key, cacheEntry)).toBe(false); }); -test("isExactKeyMatch with undefined cache entry key returns false", () => { +test("isExactKeyMatch with empty cache entry returns false", () => { const key = "linux-rust"; const cacheEntry: ArtifactCacheEntry = {};