Skip to content

Commit

Permalink
(action) fix json
Browse files Browse the repository at this point in the history
  • Loading branch information
Propagram authored Dec 19, 2023
1 parent 003c1b0 commit 10e6747
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions spec/pgmoon_spec.moon
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,9 @@ describe "pgmoon with server", ->


it "deserializes types correctly", ->
if socket_type == "redbean"
return pending "not supported for redbean at the moment."

assert pg\query [[
create table types_test (
id serial not null,
Expand Down Expand Up @@ -753,11 +756,7 @@ describe "pgmoon with server", ->
assert.same {abc: '123', foo: 'bar'}, res[1].h

describe "json", ->
local encode_json, decode_json
if socket_type == "redbean"
encode_json, decode_json = EncodeJson, DecodeJson
else
import encode_json, decode_json from require "pgmoon.json"
import encode_json, decode_json from require "pgmoon.json"

it "encodes json type", ->
t = { hello: "world" }
Expand Down

0 comments on commit 10e6747

Please sign in to comment.