Skip to content

Commit b636b64

Browse files
nfriedlymhevery
authored andcommittedDec 5, 2012
fixes issue in reporter_spec.js when run with requireJs
instanceof does not work cross-vm boundaries
1 parent 80e4362 commit b636b64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎spec/reporter_spec.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ describe('TerminalReporter', function() {
8383
});
8484

8585
it('sets the startedAt field', function() {
86-
expect(this.reporter.startedAt instanceof Date).toBeTruthy();
86+
// instanceof does not work cross-context (such as when run with requirejs)
87+
var ts = Object.prototype.toString;
88+
expect(ts.call(this.reporter.startedAt)).toBe(ts.call(new Date()));
8789
});
8890

8991
it('buildes the suites_ collection', function() {

0 commit comments

Comments
 (0)