-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit tests #33
Comments
Hello guys! |
@akabiru aweh! So I am having a tiny problem: I added a new sample test file myTest = test "Example Test" (assert True) But when I run |
Ok I think I have a handle on this I have now got a test failing. module Sample exposing (..)
import Test exposing(..)
import Expect
all : Test
all =
describe "New Test Case"
[ sampleTest]
sampleTest : Test
sampleTest =
describe "Sample 1"
[ test "New Test" <|
\() ->
Expect.equal(3 + 3) 7] My current issue is that I can't run this in conjunction with the other existing tests i.e I have changed port module TestRunner exposing (..)
import Tests
import Test.Runner.Node exposing (run, TestProgram)
import Json.Encode exposing (Value)
import Sample
main : TestProgram
main =
run emit Sample.all
port emit : ( String, Value ) -> Cmd msg Could anyone help me with running a list as |
@zacck You're on the right track. Once you have your test in module SampleTest exposing (myTest)
myTest =
test "Example Test" (assert True) You can then import the module in module Tests exposing (..)
import Test exposing (..)
import SampleTest exposing(myTest)
import Expect
import Fuzz exposing (list, int, tuple, string)
import String
all : Test
all =
describe "Sample Test Suite"
[ unitTestExample
, fuzzTestsExample
, myTest
]
-- Rest of the code |
@waiyaki aweh! Ok I think we have handle on this I had to modify your example just a tiny bit so my import String
import Sample
all : Test
all =
describe "Sample Test Suite"
[ unitTestExample
, fuzzTestsExample
, Sample.sampleTest
] Following this the tests run and my failing test does fail. |
Awesome!! Looking forward to that! 🕺🏽 |
No description provided.
The text was updated successfully, but these errors were encountered: