Skip to content

Commit

Permalink
Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Jul 10, 2021
1 parent 752fa81 commit d876255
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,9 @@

### Features

- `[jest-cli]` Adds an option (`inlineSnapshotFormatter` with `simple`) for having inline snapshot serializers use the printBasicPrototype option to show literals as literals. ([#11654](https://github.com/facebook/jest/pull/11654))


### Fixes

### Chore & Maintenance
Expand Down
5 changes: 3 additions & 2 deletions packages/jest-snapshot/src/State.ts
Expand Up @@ -204,10 +204,11 @@ export default class SnapshotState {
this._uncheckedKeys.delete(key);
}

// There is an option to allow for not showing 'Object' and 'Array' on
// snapshots, which we'd like to allow for opting into with inline snapshots.
const hasOptedInToSimpleInline =
isInline && this._preferSimpleInlineSnapshots;
debugger;
console.log({hasOptedInToSimpleInline, isInline});

const receivedSerialized = addExtraLineBreaks(
serialize(received, undefined, hasOptedInToSimpleInline),
);
Expand Down

0 comments on commit d876255

Please sign in to comment.