Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
sudo: false

language: node_js
node_js:
- "0.12"

addons:
apt:
sources:
- hvr-ghc
packages:
- cabal-install-1.22
- ghc-7.10.1


before_install:
- export PATH=/opt/ghc/7.10.1/bin:/opt/cabal/1.22/bin:./Elm-Platform/0.15.1/.cabal-sandbox/bin:$PATH
- runhaskell BuildFromSource.hs 0.15.1
- export PATH="`pwd`"/Elm-Platform/0.15.1/.cabal-sandbox/bin:$PATH
env:
matrix:
- ELM_VERSION=0.16.0 TARGET_NODE_VERSION=node
- ELM_VERSION=0.16.0 TARGET_NODE_VERSION=0.12

install:
- nvm install $TARGET_NODE_VERSION
- nvm use $TARGET_NODE_VERSION
- node --version
- npm --version
- npm install -g elm@$ELM_VERSION

script: ./ci.sh
5 changes: 5 additions & 0 deletions bin/elm-test
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ var elm = {
'elm-package': 'elm-package'
};

if (process.argv[2] == "--version") {
console.log(require(path.join(__dirname, "..", "package.json")).version);
process.exit(0);
}

if (process.argv[2] == "init") {
var copyTemplate = function(templateName) {
if (fs.existsSync(templateName)) {
Expand Down
3 changes: 3 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ function assertTestSuccess() {
echo "$0: Installing elm-test..."
npm install --global

echo "$0: Verifying installed elm-test version..."
elm-test --version

echo "$0: Testing examples..."
cd examples
assertTestSuccess PassingTests.elm
Expand Down
7 changes: 2 additions & 5 deletions examples/FailingTests.elm
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ module Main where
import Basics exposing (..)
import Signal exposing (..)

import ElmTest.Assertion as A exposing (assertEqual, assert)
import ElmTest.Run as R
import ElmTest.Runner.Console exposing (runDisplay)
import ElmTest.Test exposing (..)
import ElmTest exposing (..)
import Console exposing (IO, run)
import Task
import String
Expand All @@ -19,7 +16,7 @@ tests = suite "A Test Suite"
]

console : IO ()
console = runDisplay tests
console = consoleRunner tests

port runner : Signal (Task.Task x ())
port runner = run console
7 changes: 2 additions & 5 deletions examples/PassingTests.elm
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ module Main where
import Basics exposing (..)
import Signal exposing (..)

import ElmTest.Assertion as A exposing (assertEqual, assert)
import ElmTest.Run as R
import ElmTest.Runner.Console exposing (runDisplay)
import ElmTest.Test exposing (..)
import ElmTest exposing (..)
import Console exposing (IO, run)
import Task
import String
Expand All @@ -18,7 +15,7 @@ tests = suite "A Test Suite"
]

console : IO ()
console = runDisplay tests
console = consoleRunner tests

port runner : Signal (Task.Task x ())
port runner = run console
2 changes: 1 addition & 1 deletion examples/elm-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"exposed-modules": [],
"dependencies": {
"deadfoxygrandpa/elm-test": "2.0.0 <= v < 3.0.0",
"deadfoxygrandpa/elm-test": "2.0.0 <= v < 4.0.0",
"elm-lang/core": "2.0.0 <= v < 4.0.0",
"laszlopandy/elm-console": "1.0.1 <= v < 2.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "elm-test",
"version": "0.6.5",
"version": "0.16.0-beta",
"description": "Run elm-test suites.",
"main": "elm-test.js",
"engines": {
"node": ">=0.10.0"
"node": ">=0.12.0"
},
"scripts": {
"test": "./ci.sh"
Expand Down
4 changes: 2 additions & 2 deletions templates/TestRunner.elm
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ module Main where

import Signal exposing (Signal)

import ElmTest.Runner.Console exposing (runDisplay)
import ElmTest exposing (consoleRunner)
import Console exposing (IO, run)
import Task

import Tests

console : IO ()
console = runDisplay Tests.all
console = consoleRunner Tests.all

port runner : Signal (Task.Task x ())
port runner = run console
3 changes: 1 addition & 2 deletions templates/Tests.elm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module Tests where

import ElmTest.Assertion exposing (..)
import ElmTest.Test exposing (..)
import ElmTest exposing (..)

import String

Expand Down