Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix transactions ui snapshot for fresh data (#177)
* Add packages necessary to run tests For some reason jest can't find '@wordpress/api-fetch' unless it's installed. Even though the test doesn't actually _use_ api-fetch, it complains because one of the included files imports api-fetch. * Fix `...` (spread operator) missing error. Babel seems to need a specific package to support the `...` operator for now. See: babel/babel#10179 (comment) npm i --save-dev @babel/plugin-proposal-object-rest-spread is sufficient as a fix. * Fix transactions UI snapshot * Change from named test import to default import * Fix exports to accommodate snapshot tests * Configure jest and snapshot to use same timezone * Rename jest config files to better represent their purpose Renamed `setup-globals.js` to `jest-file-setup.js` to reflect the fact that it contains configurations run before each test file. Renamed `global-setup-jest.js` to `jest-global-setup.js` to fit the naming pattern used for the aforementioned rename. This file includes a global configuration run before each test suite.
- Loading branch information
Showing
6 changed files
with
156 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** @format **/ | ||
|
||
module.exports = async () => { | ||
process.env.TZ = 'America/New_York'; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters