Skip to content

Commit

Permalink
update tests to change in empty workbook handling
Browse files Browse the repository at this point in the history
  • Loading branch information
HLWeil committed Feb 12, 2024
1 parent 4eaf806 commit a260549
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions tests/FsSpreadsheet.ExcelIO.Tests/FsWorkbook.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ let writeAndReadBytes =
testList "WriteAndReadBytes" [
testCase "Empty" (fun () ->
let wb = new FsWorkbook()
let bytes = wb.ToBytes()
let wb2 = FsWorkbook.fromBytes(bytes)
Expect.equal (wb.GetWorksheets().Count) (wb2.GetWorksheets().Count) "Worksheet count should be equal"
let f() = wb.ToBytes()
try
f() |> ignore
failwith "Should throw an exception"
with
| _ -> ()
)
testCase "ensure table" (fun () ->
let expected = new FsWorkbook()
Expand Down

0 comments on commit a260549

Please sign in to comment.