Skip to content

Commit

Permalink
Fix false-positive snapshot mismatch
Browse files Browse the repository at this point in the history
Same reason why jest can fail with "could not find all inline snapshots".
Since we don't need "done()" on async tests we can safely remove it.
  • Loading branch information
eps1lon committed Jan 19, 2021
1 parent 735c5e6 commit 0780ad1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ describe('InspectedElement', () => {
done();
});

it('should not dehydrate nested values until explicitly requested', async done => {
it('should not dehydrate nested values until explicitly requested', async () => {
const Example = () => {
const [state] = React.useState({
foo: {
Expand Down Expand Up @@ -1431,11 +1431,9 @@ describe('InspectedElement', () => {
},
]
`);

done();
});

it('should dehydrate complex nested values when requested', async done => {
it('should dehydrate complex nested values when requested', async () => {
const Example = () => null;

const container = document.createElement('div');
Expand Down Expand Up @@ -1523,11 +1521,9 @@ describe('InspectedElement', () => {
},
}
`);

done();
});

it('should include updates for nested values that were previously hydrated', async done => {
it('should include updates for nested values that were previously hydrated', async () => {
const Example = () => null;

const container = document.createElement('div');
Expand Down Expand Up @@ -1714,11 +1710,9 @@ describe('InspectedElement', () => {
},
}
`);

done();
});

it('should not tear if hydration is requested after an update', async done => {
it('should not tear if hydration is requested after an update', async () => {
const Example = () => null;

const container = document.createElement('div');
Expand Down Expand Up @@ -1825,8 +1819,6 @@ describe('InspectedElement', () => {
},
}
`);

done();
});

it('should inspect hooks for components that only use context', async done => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ describe('InspectedElementContext', () => {
done();
});

it('should support complex data types', async done => {
it('should support complex data types', async () => {
const Immutable = require('immutable');

const Example = () => null;
Expand Down Expand Up @@ -241,8 +241,8 @@ describe('InspectedElementContext', () => {
"preview_long": DataView(3),
},
"date": Dehydrated {
"preview_short": Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Standard Time),
"preview_long": Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Standard Time),
"preview_short": Thu Jan 01 1970 01:00:00 GMT+0100 (Central European Standard Time),
"preview_long": Thu Jan 01 1970 01:00:00 GMT+0100 (Central European Standard Time),
},
"fn": Dehydrated {
"preview_short": ƒ exampleFunction() {},
Expand Down Expand Up @@ -325,8 +325,6 @@ describe('InspectedElementContext', () => {
},
}
`);

done();
});

it('should support objects with no prototype', async done => {
Expand Down Expand Up @@ -634,7 +632,7 @@ describe('InspectedElementContext', () => {
done();
});

it('should not dehydrate nested values until explicitly requested', async done => {
it('should not dehydrate nested values until explicitly requested', async () => {
const Example = () => null;

act(() =>
Expand Down Expand Up @@ -730,8 +728,6 @@ describe('InspectedElementContext', () => {
},
}
`);

done();
});

it('should enable inspected values to be stored as global variables', () => {
Expand Down

0 comments on commit 0780ad1

Please sign in to comment.