bump jest and make tests pass

This commit is contained in:
Louis Hache
2020-11-13 19:11:55 +01:00
parent d28dc26fa3
commit 4f58d166b7
5769 changed files with 856618 additions and 394571 deletions
+3 -1
View File
@@ -11,6 +11,8 @@ exports.default = convertDescriptorToString;
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable local/ban-types-eventually */
// See: https://github.com/facebook/jest/pull/5154
function convertDescriptorToString(descriptor) {
if (
@@ -31,7 +33,7 @@ function convertDescriptorToString(descriptor) {
const stringified = descriptor.toString();
const typeDescriptorMatch = stringified.match(/class|function/);
const indexOfNameSpace = // @ts-ignore: typeDescriptorMatch exists
const indexOfNameSpace = // @ts-expect-error: typeDescriptorMatch exists
typeDescriptorMatch.index + typeDescriptorMatch[0].length;
const indexOfNameAfterSpace = stringified.search(/\(|\{/);
const name = stringified.substring(indexOfNameSpace, indexOfNameAfterSpace);