Skip to content

Commit

Permalink
tests: add unit test for as,Spectra,MSpectra
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Sep 12, 2024
1 parent 3fad522 commit dcc15a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/testthat/test_functions-MSpectra.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,7 @@ test_that(".spectra_to_spectrum_list and as,Spectra,MSpectra works", {
expect_equal(length(a), length(sps_dda))
expect_true(all(vapply(a, function(z) inherits(z, "Spectrum"), logical(1))))


a <- as(sps_dda, "MSpectra")
expect_s4_class(a, "MSpectra")
expect_equal(all(msLevel(a)), Spectra::msLevel(sps_dda))
})

0 comments on commit dcc15a3

Please sign in to comment.