Skip to content
This repository was archived by the owner on Nov 4, 2020. It is now read-only.

Commit 3fcff6c

Browse files
committed
Fix flaky tests
1 parent 4e97b97 commit 3fcff6c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: test/ext/match.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,17 @@ describe('match', function() {
121121

122122
err(function() {
123123
({ a: 10, b: 'abc', c: { d: 10 }, d: 0 }).should
124-
.match({ a: 11, b: /c$/, c: function(it) {
124+
.match({ a: 11, b: /c$/, c: function c(it) {
125125
return it.should.have.property('d', 10);
126126
}});
127-
}, "expected Object { a: 10, b: 'abc', c: Object { d: 10 }, d: 0 } to match Object { a: 11, b: /c$/, c: Function { name: '' } }\n not matched properties: a (10)\n matched properties: b, c");
127+
}, "expected Object { a: 10, b: 'abc', c: Object { d: 10 }, d: 0 } to match Object { a: 11, b: /c$/, c: Function { name: 'c' } }\n not matched properties: a (10)\n matched properties: b, c");
128128

129129
err(function() {
130130
({ a: 10, b: 'abc', c: { d: 10 }, d: 0 }).should.not
131-
.match({ a: 10, b: /c$/, c: function(it) {
131+
.match({ a: 10, b: /c$/, c: function c(it) {
132132
return it.should.have.property('d', 10);
133133
}});
134-
}, "expected Object { a: 10, b: 'abc', c: Object { d: 10 }, d: 0 } not to match Object { a: 10, b: /c$/, c: Function { name: '' } }\n matched properties: a, b, c (false negative fail)");
134+
}, "expected Object { a: 10, b: 'abc', c: Object { d: 10 }, d: 0 } not to match Object { a: 10, b: /c$/, c: Function { name: 'c' } }\n matched properties: a, b, c (false negative fail)");
135135
});
136136

137137
it('test each property match(function)', function() {

Diff for: test/ext/property.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ describe('property', function() {
5151
}, "expected 'asd' not to have property length of 3 (false negative fail)");
5252

5353
err(function() {
54-
var obj = { f: function() {} };
55-
var f1 = function() {};
54+
var obj = { f: function f() {} };
55+
var f1 = function f1() {};
5656
f1.a = 1;
5757
obj.should.have.property('f', f1);
58-
}, "expected Object { f: Function { name: '' } } to have property f of Function { a: 1, name: '' } (got Function { name: '' })");
58+
}, "expected Object { f: Function { name: 'f' } } to have property f of Function { a: 1, name: 'f1' } (got Function { name: 'f' })");
5959

6060
err(function() {
6161
({a: {b: 1}}).should.have.property('a')

0 commit comments

Comments
 (0)