- 
                Notifications
    You must be signed in to change notification settings 
- Fork 11
Open
Description
There is a so-called "Power assertions" that makes assertions quite more powerful. The best way to demonstrate power assertion is an example:
    assert(types[index].name === bob.name)
           |    ||      |    |   |   |
           |    ||      |    |   |   "bob"
           |    ||      |    |   Person{name:"bob",age:5}
           |    ||      |    false
           |    |11     "alice"
           |    Person{name:"alice",age:3}
           ["string",98.6,true,false,null,undefined,#Array#,#Object#,NaN,Infinity,/^not/,#Person#]
  
    --- [string] bob.name
    +++ [string] types[index].name
    @@ -1,3 +1,5 @@
    -bob
    +alicePower assertions in other languages: Kotlin 1, Rust 2, .NET 3, Ruby 4, Javasctipt 5, Grooyv 6.
Footnotes
Metadata
Metadata
Assignees
Labels
No labels