feat: add fromJSON support (#352)

This commit is contained in:
Owen
2020-09-02 04:55:29 +08:00
committed by GitHub
parent b6f1df4d2f
commit d521fa5bba
2 changed files with 17 additions and 0 deletions

View File

@@ -80,6 +80,8 @@ func TestEvaluate(t *testing.T) {
{"join('hello','mona')", "hello mona", ""},
{"toJSON({'foo':'bar'})", "{\n \"foo\": \"bar\"\n}", ""},
{"toJson({'foo':'bar'})", "{\n \"foo\": \"bar\"\n}", ""},
{"(fromJSON('{\"foo\":\"bar\"}')).foo", "bar", ""},
{"(fromJson('{\"foo\":\"bar\"}')).foo", "bar", ""},
{"hashFiles('**/package-lock.json')", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", ""},
{"success()", "true", ""},
{"failure()", "false", ""},