X <- toyModel("NMF")
X[sample(seq(length(X)), 0.1*length(X))] <- NA

out1 <- NMF(X, J=3, algorithm="Frobenius", num.iter=2)
out2 <- NMF(X, J=3, algorithm="KL", num.iter=2)
out3 <- NMF(X, J=3, algorithm="IS", num.iter=2)
out4 <- NMF(X, J=3, algorithm="Pearson", num.iter=2)
out5 <- NMF(X, J=3, algorithm="Hellinger", num.iter=2)
out6 <- NMF(X, J=3, algorithm="Neyman", num.iter=2)
out7 <- NMF(X, J=3, algorithm="Alpha", num.iter=2)
out8 <- NMF(X, J=3, algorithm="Beta", num.iter=2)

out9 <- NMF(X, J=3, algorithm="ALS", num.iter=2)
out10 <- NMF(X, J=3, algorithm="PGD", num.iter=2)
out11 <- NMF(X, J=3, algorithm="HALS", num.iter=2)
out12 <- NMF(X, J=3, algorithm="GCD", num.iter=2)
out13 <- NMF(X, J=3, algorithm="Projected", num.iter=2)
out14 <- NMF(X, J=3, algorithm="NHR", num.iter=2)
out15 <- NMF(X, J=3, algorithm="DTPP", num.iter=2)
out16 <- NMF(X, J=3, algorithm="Orthogonal", num.iter=2)
out17 <- NMF(X, J=3, algorithm="OrthReg", num.iter=2)

expect_equivalent(length(out1), 10)
expect_equivalent(length(out2), 10)
expect_equivalent(length(out3), 10)
expect_equivalent(length(out4), 10)
expect_equivalent(length(out5), 10)
expect_equivalent(length(out6), 10)
expect_equivalent(length(out7), 10)
expect_equivalent(length(out8), 10)
expect_equivalent(length(out9), 10)
expect_equivalent(length(out10), 10)
expect_equivalent(length(out11), 10)
expect_equivalent(length(out12), 10)
expect_equivalent(length(out13), 10)
expect_equivalent(length(out14), 10)
expect_equivalent(length(out15), 10)
expect_equivalent(length(out16), 10)
expect_equivalent(length(out17), 10)
