Permalink
Browse files

Don't use util.format for Node 0.4 compatibility

  • Loading branch information...
fgnass committed Jan 28, 2012
1 parent 19c208a commit 9b9d5a190bd2783c0706519fe1f03526f2a03453
Showing with 5 additions and 2 deletions.
  1. +5 −2 test/w3c/harness/index.js
@@ -1,14 +1,17 @@
var fs = require('fs');
var vm = require('vm');
var assert = require('assert');
-var printf = require('util').format;
+var util = require('util');
var Path = require('path');
var domino = require('../../../lib');
var impl = domino.createDOMImplementation();
var globals = {
assertEquals: function(message, expected, actual) {
- assert.equal(actual, expected, printf('%s: expected %j got %j', message, expected, actual));
+ assert.equal(actual, expected, message + ': expected ' +
+ util.inspect(expected, false, 0) + ' got ' +
+ util.inspect(actual, false, 0)
+ );
},
assertTrue: function(message, actual) {
globals.assertEquals(message, true, actual);

0 comments on commit 9b9d5a1

Please sign in to comment.