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
12 changes: 0 additions & 12 deletions src/test/suite/util/file-util.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepEqual, doesNotThrow, equal, throws } from "assert"

Check failure on line 1 in src/test/suite/util/file-util.test.ts

View workflow job for this annotation

GitHub Actions / build

'equal' is defined but never used

Check failure on line 1 in src/test/suite/util/file-util.test.ts

View workflow job for this annotation

GitHub Actions / build

'equal' is defined but never used

import { Settings } from "../../../settings"
import { FileUtil } from "../../../util/file-util"
Expand Down Expand Up @@ -33,18 +33,6 @@
})
})

suite("Test FileUtil - readFile()", () => {
const fileutil = new FileUtil()

test("when `file` is a path to an existing file should return the files content", () => {
equal(fileutil.readFile("./src/test/suite/util/resources/readFile.txt"), "lorem impsum")
})

test("when `file` is a path to a non existing file should throw", () => {
throws(() => fileutil.readFile("nonexistent-path"), Error)
})
})

suite("Test FileUtil - sortFile()", () => {
const fileutil = new FileUtil()

Expand Down
4 changes: 0 additions & 4 deletions src/util/file-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ export class FileUtil {
return files
}

readFile(file: string) {
return readFileSync(file, this.encoding).toString()
}

sortFile(file: string) {
const yamlutil = new YamlUtil()
const text = readFileSync(file, this.encoding).toString()
Expand Down
Loading