From a4a17b8b40b2960887f6a8135061a65c3605333c Mon Sep 17 00:00:00 2001 From: Dean Landolt Date: Mon, 22 Dec 2014 11:44:58 -0500 Subject: [PATCH] Clean up tests, add runner cmd to package.json --- package.json | 9 ++++++--- tests/data/TestStore | 4 +++- tests/model.js | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b75eec1..f90b0e1 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "mappings": { "tunguska": "http://github.com/kriszyp/tunguska/zipball/v0.2.2", "rql": "jar:http://github.com/kriszyp/rql/zipball/v0.2.2!/", - "patr": "jar:http://github.com/kriszyp/patr/zipball/v0.2.2!/", + "patr": "jar:http://github.com/kriszyp/patr/zipball/v0.2.6!/", "promised-io": "jar:http://github.com/kriszyp/promised-io/zipball/v0.2.2!/", "json-schema": "http://github.com/kriszyp/json-schema/zipball/v0.2.1", "mysql-native": "jar:http://github.com/sidorares/nodejs-mysql-native/zipball/master!/lib/mysql-native/", @@ -65,7 +65,10 @@ "json-schema": ">=0.2.1" }, "devDependencies": { - "patr": ">0.2.6" + "patr": ">=0.2.6" }, - "jars":["jars/perstore.jar"] + "jars":["jars/perstore.jar"], + "scripts": { + "test": "cd tests; node ." + } } diff --git a/tests/data/TestStore b/tests/data/TestStore index 43d7742..5082b43 100644 --- a/tests/data/TestStore +++ b/tests/data/TestStore @@ -1 +1,3 @@ -{1:{id:1, foo:2, rand:0.7013372050189607}, 2:{id:2, foo:1, bar:"hi"}, 3:{id:3, foo:1, bar:"hello"}} \ No newline at end of file +{id:1, foo:2, rand:0.7013372050189607}, +{id:2, foo:1, bar:"hi"}, +{id:3, foo:1, bar:"hello"}, diff --git a/tests/model.js b/tests/model.js index 0553828..84b7cb2 100644 --- a/tests/model.js +++ b/tests/model.js @@ -1,5 +1,5 @@ var assert = require("assert"), - store = require("../stores").DefaultStore("TestStore"), + store = require("../stores").DefaultStore({ filename: "TestStore" }), model = require("../model").Model(store, { prototype: { testMethod: function(){