tweak: wording
parent
0960e4fe0f
commit
8c076ef959
|
|
@ -81,7 +81,7 @@ export namespace Truncate {
|
|||
}
|
||||
|
||||
const removed = hitBytes ? totalBytes - bytes : lines.length - out.length
|
||||
const unit = hitBytes ? "chars" : "lines"
|
||||
const unit = hitBytes ? "bytes" : "lines"
|
||||
const preview = out.join("\n")
|
||||
|
||||
await init()
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ describe("Truncate", () => {
|
|||
const result = await Truncate.output(content)
|
||||
|
||||
expect(result.truncated).toBe(true)
|
||||
expect(result.content).toContain("chars truncated...")
|
||||
expect(result.content).toContain("bytes truncated...")
|
||||
expect(Buffer.byteLength(content, "utf-8")).toBeGreaterThan(Truncate.MAX_BYTES)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue