Skip to content

Commit

Permalink
Fix snapshot with non-ascii character (apollographql#10611)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevinAvery authored Mar 8, 2023
1 parent 02605bb commit afccbdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Object {
"ROOT_QUERY": Object {
"__typename": "Query",
"currentTime({\\"tz\\":\\"UTC-5\\"})": Object {
"localeString": "9/25/2020, 1:08:33PM",
"localeString": "9/25/2020, 1:08:33 PM",
},
"someJSON": Object {
"foos": Array [
Expand Down
8 changes: 2 additions & 6 deletions src/cache/inmemory/__tests__/writeToStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2030,8 +2030,6 @@ describe('writing to the store', () => {
}
`;

const date = new Date(1601053713081);

cache.writeQuery({
query,
data: {
Expand All @@ -2040,9 +2038,7 @@ describe('writing to the store', () => {
foos: ["bar", "baz"],
},
currentTime: {
localeString: date.toLocaleString("en-US", {
timeZone: "America/New_York",
}),
localeString: '9/25/2020, 1:08:33 PM'
},
},
});
Expand All @@ -2058,7 +2054,7 @@ describe('writing to the store', () => {
zxcv: "lower",
},
currentTime: {
msSinceEpoch: date.getTime(),
msSinceEpoch: 1601053713081,
},
},
});
Expand Down

0 comments on commit afccbdb

Please sign in to comment.