Skip to content

Commit

Permalink
update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
justinwoo authored and bodil committed May 28, 2018
1 parent 888bef0 commit a8ce80d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
@@ -1,8 +1,15 @@
node_js:
- "node"
language: node_js
env:
- PATH=$HOME/purescript:$PATH
install:
- npm install -g purescript pulp bower
- TAG=$(wget -q -O - https://github.com/purescript/purescript/releases/latest --server-response --max-redirect 0 2>&1 | sed -n -e 's/.*Location:.*tag\///p')
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
- chmod a+x $HOME/purescript
- npm install -g bower pulp
- npm install
- bower install
script:
- pulp test
20 changes: 10 additions & 10 deletions bower.json
Expand Up @@ -15,15 +15,15 @@
"output"
],
"dependencies": {
"purescript-aff": "#compiler/0.12",
"purescript-either": "#compiler/0.12",
"purescript-prelude": "#compiler/0.12",
"purescript-effect": "#compiler/0.12",
"purescript-quickcheck": "#compiler/0.12",
"purescript-free": "#compiler/0.12",
"purescript-strings": "#compiler/0.12",
"purescript-lists": "#compiler/0.12",
"purescript-js-timers": "#compiler/0.12",
"purescript-avar": "#compiler/0.12"
"purescript-aff": "^5.0.0",
"purescript-either": "^4.0.0",
"purescript-prelude": "^4.0.0",
"purescript-effect": "^2.0.0",
"purescript-quickcheck": "^5.0.0",
"purescript-free": "^5.0.0",
"purescript-strings": "^4.0.0",
"purescript-lists": "^5.0.0",
"purescript-js-timers": "^4.0.0",
"purescript-avar": "^3.0.0"
}
}
13 changes: 8 additions & 5 deletions test/Main.purs
Expand Up @@ -17,6 +17,9 @@ import Test.Unit.QuickCheck (quickCheck)
theCommutativeProperty :: Int -> Int -> Result
theCommutativeProperty a b = (a + b) === (b + a)

modify' :: forall a. (a -> a) -> Ref.Ref a -> Effect Unit
modify' m s = void $ Ref.modify m s

tests :: Ref.Ref Int -> TestSuite
tests ref = do
test "basic asserts" do
Expand All @@ -33,7 +36,7 @@ tests ref = do
test "a test in a test suite" do
pure unit
test "tests run only once: part 1" do
liftEffect $ Ref.modify (_ + 1) ref
liftEffect $ modify' (_ + 1) ref
test "tests run only once: part deux" do
Assert.equal 1 =<< liftEffect (Ref.read ref)
suite "another suite" do
Expand Down Expand Up @@ -63,14 +66,14 @@ main = run do
failure "skippedTestError"
suite "not skipped suite" do
test "not skipped test" do
liftEffect $ Ref.modify (add 1) var1
liftEffect $ modify' (add 1) var1
pure unit
suiteSkip "skipped subsuite" do
test "skip 3" do
failure "skippedTestError"
suite "not skipped inner suite" do
test "also not skipped" do
liftEffect $ Ref.modify (add 1) var1
liftEffect $ modify' (add 1) var1
pure unit

runTestWith Fancy.runTest do
Expand All @@ -81,15 +84,15 @@ main = run do
var2 <- liftEffect $ Ref.new 0
runTestWith Fancy.runTest do
testOnly "only 1" do
liftEffect $ Ref.modify (add 1) var2
liftEffect $ modify' (add 1) var2
pure unit
test "skipped 1" do
failure "onlyTestError"
suite "suite" do
test "skipped 2" do
failure "onlyTestError"
testOnly "only 2" do
liftEffect $ Ref.modify (add 1) var2
liftEffect $ modify' (add 1) var2
pure unit
suite "empty suite" do
test "skipped 3" do
Expand Down

0 comments on commit a8ce80d

Please sign in to comment.