Permalink
Browse files

remove usage of mixin()

  • Loading branch information...
1 parent b05a25a commit 02811feb08067b6035372e01c87993265a1bafb6 @orlandov orlandov committed Apr 23, 2010
Showing with 21 additions and 17 deletions.
  1. +6 −3 tests/test_bson.js
  2. +5 −6 tests/test_many_insert.js
  3. +4 −5 tests/test_many_insert_async.js
  4. +6 −3 tests/test_mongo.js
View
@@ -2,10 +2,13 @@ require.paths.push("lib");
var sys = require("sys"),
mongo = require("mongo"),
- mongodb = require("mongodb");
+ mongodb = require("mongodb"),
+ assert = require("assert");
-process.mixin(GLOBAL, require('assert'));
-jjj = JSON.stringify;
+ok = assert.ok;
+equal = assert.equal;
+throws = assert.throws;
+deepEqual = assert.deepEqual;
var bson = { encode: mongo.encode, decode: mongo.decode };
View
@@ -2,14 +2,13 @@
// thanks to sifu@github for the testcase
-process.mixin(GLOBAL, require('mjsunit'));
+assert = require('assert');
+deepEqual = assert.deepEqual;
require.paths.push("lib");
-var mongodb = require( 'mongodb' );
-var sys = require( 'sys' );
+var mongodb = require('mongodb');
+var sys = require('sys');
var mongo = new mongodb.MongoDB();
-
-jjj = JSON.stringify
mongo.addListener('connection', function( ) {
var test = mongo.getCollection( 'widgets' );
test.remove();
@@ -20,7 +19,7 @@ mongo.addListener('connection', function( ) {
}
test.count(null, function (count) {
- assertEquals(count, 1000);
+ deepEqual(count, 1000);
mongo.close();
});
});
@@ -1,13 +1,12 @@
#!/usr/bin/env node
-process.mixin(GLOBAL, require('mjsunit'));
+assert = require('assert');
+deepEqual = assert.deepEqual;
require.paths.push("lib");
-var mongodb = require( 'mongodb' );
-var sys = require( 'sys' );
+var mongodb = require('mongodb');
+var sys = require('sys');
var mongo = new mongodb.MongoDB();
-
-jjj = JSON.stringify
mongo.addListener('connection', function( ) {
var test = mongo.getCollection( 'widgets' );
test.remove();
View
@@ -1,8 +1,11 @@
#!/usr/bin/env node
-process.mixin(GLOBAL, require('assert'));
-
-var jjj = JSON.stringify;
+assert = require('assert');
+ok = assert.ok;
+equal = assert.equal;
+throws = assert.throws;
+deepEqual = assert.deepEqual;
+notEqual = assert.notEqual;
var sys = require("sys");

0 comments on commit 02811fe

Please sign in to comment.