Skip to content

Commit 97ecf4f

Browse files
reverted to multithread safe quickjs env in tests
1 parent fa3d616 commit 97ecf4f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/Spec.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Quickjs
1818

1919

2020
eval_1_plus_2 :: Assertion
21-
eval_1_plus_2 = quickjs $ do
21+
eval_1_plus_2 = quickjsMultithreaded $ do
2222
v <- eval "1 + 2;"
2323
liftIO $ v @?= Number 3
2424

@@ -52,7 +52,7 @@ instance QC.Arbitrary Value where
5252

5353
marshall_to_from_JSValue :: Value -> QC.Property
5454
marshall_to_from_JSValue val = QC.monadicIO $ do
55-
val' <- QC.run $ quickjs $ withJSValue val $ \jsval ->
55+
val' <- QC.run $ quickjsMultithreaded $ withJSValue val $ \jsval ->
5656
fromJSValue_ jsval
5757
QC.assert $ val == val'
5858

@@ -61,9 +61,9 @@ tests =
6161
-- adjustOption (\_ -> QuickCheckTests 10) $
6262
-- adjustOption (\_ -> QuickCheckVerbose True) $
6363
testGroup "Quickjs"
64-
[ testCase "empty quickjs call" (quickjs $ pure ())
65-
, after AllSucceed "empty quickjs call" $ testCase "eval '1 + 2;'" eval_1_plus_2
66-
, after AllSucceed "eval" $ testProperty "marshalling Value to JSValue and back" marshall_to_from_JSValue
64+
[ testCase "empty quickjs call" (quickjsMultithreaded $ pure ())
65+
, testCase "eval '1 + 2;'" eval_1_plus_2
66+
, testProperty "marshalling Value to JSValue and back" marshall_to_from_JSValue
6767
]
6868

6969
main = defaultMain tests

0 commit comments

Comments
 (0)