Skip to content

Commit

Permalink
Update parse dependency and add JS test
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed Oct 24, 2024
1 parent 85a6fdc commit 18eed7b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/fsnotify/fsnotify v1.7.0
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2
github.com/tdewolff/argp v0.0.0-20240625173203-87b04d5d3e52
github.com/tdewolff/parse/v2 v2.7.17
github.com/tdewolff/parse/v2 v2.7.18
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/tdewolff/argp v0.0.0-20240625173203-87b04d5d3e52 h1:bHOA+qzNf3CwchHAIA1k68QgERWiOgZMIh3qoOB3DzA=
github.com/tdewolff/argp v0.0.0-20240625173203-87b04d5d3e52/go.mod h1:e1dkYfBKpwfFhwXWrQpEU2ClFgxYOT4SrHd6fKD7nIE=
github.com/tdewolff/parse/v2 v2.7.17 h1:uC10p6DaQQORDy72eaIyD+AvAkaIUOouQ0nWp4uD0D0=
github.com/tdewolff/parse/v2 v2.7.17/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA=
github.com/tdewolff/parse/v2 v2.7.18 h1:uSqjEMT2lwCj5oifBHDcWU2kN1pbLrRENgFWDJa57eI=
github.com/tdewolff/parse/v2 v2.7.18/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W1aghka0soA=
github.com/tdewolff/test v1.0.6/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 h1:IkjBCtQOOjIn03u/dMQK9g+Iw9ewps4mCl1nB8Sscbo=
Expand Down
8 changes: 4 additions & 4 deletions js/js_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ func TestJS(t *testing.T) {
{`x=undefined`, `x=void 0`},
{`x=undefined()`, `x=(void 0)()`},
{`x=undefined.a`, `x=(void 0).a`},
//{`undefined=5;x=undefined`, `undefined=5;x=undefined`},
//{`{const undefined=5;x=undefined}`, `{const undefined=5;x=undefined}`},
{`x=Infinity`, `x=1/0`},
{`x=Infinity()`, `x=(1/0)()`},
{`x=2**Infinity`, `x=2**(1/0)`},
//{`Infinity=5;x=Infinity`, `Infinity=5;x=Infinity`},
//{`{const Infinity=5;x=Infinity}`, `{const Infinity=5;x=Infinity}`},
{`!""`, `!0`},
{`!"foobar"`, `!1`},
{`class a extends undefined {}`, `class a extends(void 0){}`},
Expand Down Expand Up @@ -636,7 +636,7 @@ func TestJS(t *testing.T) {
{`a||=b`, `a||=b`},
{`a??=b`, `a??=b`},
{`a==false`, `a==!1`},
{`a===false`, `a===!1`},
//{`a===false`, `a===false`},
{`!(a||b)`, `!a&&!b`},
{`!(a&&b)`, `!a||!b`},
{`!(a&&b)&&c`, `!(a&&b)&&c`},
Expand All @@ -648,7 +648,7 @@ func TestJS(t *testing.T) {
{`!(0<1&&1<2)`, `!(0<1&&1<2)`},
{`!(a&&b||c&&d)`, `!(a&&b||c&&d)`},
{`!((a||b)&&(c||d))`, `!a&&!b||!c&&!d`},
{`a===false||b===true?false:true`, `a!==!1&&b!==!0`},
{`a==false||b==true?false:true`, `a!=!1&&b!=!0`},
//{`!(!(a>=0||a<=1)&&!(a>=2||a<=3))`, `!!(a>=0||a<=1||a>=2||a<=3)`}, // TODO
{`!!(a===null||a===undefined)`, `a==null`},
{`a!==null&&a!==undefined`, `a!=null`},
Expand Down

0 comments on commit 18eed7b

Please sign in to comment.