On Friday, December 2, 2016 at 12:52:48 PM UTC, Rupert Smith wrote:
>
> On Friday, December 2, 2016 at 12:41:43 PM UTC, Rupert Smith wrote:
>>
>> I'm not sure the tests are actually running or what I might need to do to
>> run them with elm-test.
>>
>
> Seems elm-test has moved on quite a bit from 1.x versions. But 'elm-test
> init' spits out an example of to use it, so I will try and follow that.
>
I've got the tests running now. 3 fail. I'm guessing this is because the
internal representation of the DOM has changed as Elm has changed? It seems
the attribute "width" is being treated differently to other attributes.
Would it be correct to just adjust the tests to match what they are
outputting and take that as correct?
Running 53 tests. To reproduce these results, run: elm-test --seed
466964471
↓ BasicTests
✗ empty divs with many attributes get attributes as a string
"<div class=\"dog\" value=\"cat\"></div>"
╷
│ Expect.equal
╵
"<div class=\"dog\" value=\"cat\" width=\"50\"></div>"
↓ BasicTests
✗ empty divs with many attributes are decoded to empty div nodes with
attributes
NodeEntry { tag = "div", children = [], facts = { styles =
Dict.fromList [], events = Nothing, attributes = Just { width = "50" },
attributeNamespace = Nothing, stringOthers = Dict.fromList
[("className","dog"),("value","cat")], boolOthers = Dict.fromList [] },
descendantsCount = 0 }
╷
│ Expect.equal
╵
NodeEntry { tag = "div", children = [], descendantsCount = 0, facts = {
styles = Dict.fromList [], events = Nothing, attributes = Nothing,
attributeNamespace = Nothing, stringOthers = Dict.fromList
[("className","dog"),("value","cat"),("width","50")], boolOthers =
Dict.fromList [] } }
↓ BasicTests
✗ query by attribute finds all nodes
[]
╷
│ Expect.equal
╵
[NodeEntry { tag = "div", children = [], descendantsCount = 0, facts =
{ styles = Dict.fromList [], events = Nothing, attributes = Nothing,
attributeNamespace = Nothing, stringOthers = Dict.fromList
[("className","dog"),("value","cat"),("width","50")], boolOthers =
Dict.fromList [] } }]
TEST RUN FAILED
Duration: 43 ms
Passed: 50
Failed: 3
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.