git.iko.soy/purescript-indexed-DB
on master help sign in
remove Test.Spec.Mocha from src and add it as an external dependency
564ff75KtorZ
bower.json+7−6
@@ -25,13 +25,14 @@
25 "url": "git://github.com/KtorZ/purescript-ifrit.git"
25 "url": "git://github.com/KtorZ/purescript-ifrit.git"
26 },
26 },
27 "dependencies": {
27 "dependencies": {
28− "purescript-maybe": "3.0.0",
28+ "purescript-maybe": "^3.0.0",
29− "purescript-aff": "3.1.0",
29+ "purescript-aff": "^3.1.0",
30− "purescript-datetime": "3.2.0"
30+ "purescript-datetime": "^3.2.0"
31 },
31 },
32 "devDependencies": {
32 "devDependencies": {
33− "purescript-spec": "1.0.0",
33+ "purescript-spec": "^1.0.0",
34− "purescript-psci-support": "3.0.0",
34+ "purescript-psci-support": "^3.0.0",
35− "purescript-now": "3.0.0"
35+ "purescript-now": "^3.0.0",
36+ "purescript-spec-mocha": "https://github.com/truqu/purescript-spec-mocha.git#0.5.0"
36 }
37 }
37}
38}
src/Test/Spec/Mocha.jsdeleted−46
@@ -1,46 +0,0 @@
1−/* global exports, it */
2−
3−// module Test.Spec.Mocha
4−
5−if (typeof describe !== 'function' || typeof it !== 'function') {
6− throw new Error('Mocha globals seem to be unavailable!');
7−}
8−
9−exports.itAsync = function (only) {
10− "use strict";
11− return function (name) {
12− return function (aff) {
13− return function () {
14− var f = only ? it.only : it;
15− f(name, function (done) {
16− aff(function () {
17− done();
18− }, function (err) {
19− done(err);
20− });
21− });
22− };
23− };
24− };
25−};
26−
27−exports.itPending = function (name) {
28− "use strict";
29− return function () {
30− it(name);
31− };
32−};
33−
34−exports.describe = function (only) {
35− "use strict";
36− return function (name) {
37− return function (nested) {
38− return function () {
39− var f = only ? describe.only : describe;
40− f(name, function () {
41− nested();
42− });
43− };
44− };
45− };
46−};
src/Test/Spec/Mocha.pursdeleted−41
@@ -1,41 +0,0 @@
1−module Test.Spec.Mocha (
2− runMocha,
3− MOCHA()
4− ) where
5−
6−import Prelude
7−
8−import Control.Monad.Aff (Aff())
9−import Control.Monad.Eff (kind Effect, Eff())
10−
11−import Data.Foldable (traverse_)
12−
13−import Test.Spec (Spec, Group(..), collect)
14−
15−foreign import data MOCHA :: Effect
16−
17−foreign import itAsync :: forall e.
18− Boolean
19− -> String
20− -> Aff e Unit
21− -> Eff (mocha :: MOCHA | e) Unit
22−
23−foreign import itPending :: forall e. String
24− -> Eff (mocha :: MOCHA | e) Unit
25−
26−foreign import describe :: forall e.
27− Boolean
28− -> String
29− -> Eff (mocha :: MOCHA | e) Unit
30− -> Eff (mocha :: MOCHA | e) Unit
31−
32−registerGroup :: forall e. (Group (Aff e Unit))
33− -> Eff (mocha :: MOCHA | e) Unit
34−registerGroup (It only name test) = itAsync only name test
35−registerGroup (Pending name) = itPending name
36−registerGroup (Describe only name groups) =
37− describe only name (traverse_ registerGroup groups)
38−
39−runMocha :: forall e. Spec e Unit
40− -> Eff (mocha :: MOCHA | e) Unit
41−runMocha spec = traverse_ registerGroup (collect spec)