From 000143999de0ee2d61dfd207117542c817df66a4 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sun, 12 Dec 2021 10:40:45 -0800 Subject: [PATCH] Fix order of expected and actual values in assertions --- test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.js b/test.js index d38fc0e..4a19ddf 100755 --- a/test.js +++ b/test.js @@ -13,12 +13,12 @@ var assert = require('assert'), Time = new Date(1307472705067); // Tue, 07 Jun 2011 18:51:45 GMT assert.fn = function(value, msg) { - assert.equal('function', typeof value, msg); + assert.equal(typeof value, 'function', msg); }; function assertFormat(time, format, expected, name, strftime) { var actual = strftime(format, time); - assert.equal(expected, actual, name + '("' + format + '", ' + time + ') is ' + JSON.stringify(actual) + ', expected ' + JSON.stringify(expected)); + assert.equal(actual, expected, name + '("' + format + '", ' + time + ') is ' + JSON.stringify(actual) + ', expected ' + JSON.stringify(expected)); } assert.format = function(format, expected, expectedUTC, time) {