mirror of
https://github.com/facebook/react.git
synced 2026-02-24 12:43:00 +00:00
Jest 15 has just been released and is way more awesome: http://facebook.github.io/jest/blog/2016/09/01/jest-15.html This pull request updates jest from version 12 to 15. Right now there's a fix in jest around Symbol that hasn't been released yet, so this will break CI and cannot be merged it. But once it ships by the end of the day, we'll be good to go :) See comments inline for all the changes I've done.
32 lines
728 B
JavaScript
32 lines
728 B
JavaScript
/*!
|
|
* Copyright 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
var expect = global.expect;
|
|
|
|
var numExpectations = 0;
|
|
|
|
global.expect = function() {
|
|
numExpectations += 1;
|
|
return expect.apply(this, arguments);
|
|
};
|
|
|
|
beforeEach(() => numExpectations = 0);
|
|
|
|
jasmine.currentEnv_.addReporter({
|
|
specDone: (spec) => {
|
|
console.log(
|
|
`EQUIVALENCE: ${spec.description}, ` +
|
|
`status: ${spec.status}, ` +
|
|
`numExpectations: ${numExpectations}`
|
|
);
|
|
},
|
|
});
|