Skip to content

Commit 469b0cf

Browse files
author
Brian Vaughn
committed
Fixed all but one test
1 parent 5365a04 commit 469b0cf

File tree

9 files changed

+508
-664
lines changed

9 files changed

+508
-664
lines changed

packages/react-devtools-shared/src/__tests__/__snapshots__/inspectedElement-test.js.snap

Lines changed: 0 additions & 44 deletions
This file was deleted.

packages/react-devtools-shared/src/__tests__/dehydratedValueSerializer.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
import {meta} from 'react-devtools-shared/src/hydration';
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @flow
8+
*/
29

310
// test() is part of Jest's serializer API
411
export function test(maybeDehydratedValue) {
12+
const {meta} = require('react-devtools-shared/src/hydration');
513
return (
614
maybeDehydratedValue !== null &&
715
typeof maybeDehydratedValue === 'object' &&
@@ -12,6 +20,7 @@ export function test(maybeDehydratedValue) {
1220

1321
// print() is part of Jest's serializer API
1422
export function print(dehydratedValue, serialize, indent) {
23+
const {meta} = require('react-devtools-shared/src/hydration');
1524
const indentation = Math.max(indent('.').indexOf('.') - 2, 0);
1625
const paddingLeft = ' '.repeat(indentation);
1726
return (

0 commit comments

Comments
 (0)