Permalink
Browse files

new mocha testst

  • Loading branch information...
1 parent 42f3b79 commit a2d232cdcd6c1ba970619de75d25d1b1f326a2aa @kmpm committed Aug 13, 2013
Showing with 39 additions and 2 deletions.
  1. +4 −2 package.json
  2. +35 −0 test/test.js
View
@@ -4,7 +4,7 @@
"keywords": ["mcquery", "protocol", "query", "minecraft"],
"homepage": "https://github.com/kmpm/node-mcquery",
"author": "Peter Magnusson kmpm@birchroad.net",
- "version": "0.1.0",
+ "version": "0.1.1",
"main":"mcquery.js",
"engines": {
"node": ">=v0.6.2"
@@ -15,6 +15,8 @@
"url" : "http://github.com/kmpm/node-mcquery.git"
},
"devDependencies": {
- "vows": "*"
+ "vows": "*",
+ "mocha": "*",
+ "async": "*"
}
}
View
@@ -0,0 +1,35 @@
+
+/*global describe it before after */
+
+var assert = require('assert');
+
+var server ={
+ host: 'srv8.streamcraft.net',
+ port: 33334
+};
+
+var Query = require('../mcquery');
+
+var global_query = new Query('srv1.streamcraft.net', 11111);
+
+describe('mcquery', function() {
+
+ describe('after connection', function(){
+ before(function(done){
+ this.timeout(5000);
+ global_query.connect(function(err, session){
+ assert.isNull(err);
+ });
+ });
+
+ after(function(done){
+ global_query.close;
+ });
+
+ it('basic_stat should work', function(done){
+ global_query.basic_stat(done);
+ });
+
+ });
+
+});

0 comments on commit a2d232c

Please sign in to comment.