-
Notifications
You must be signed in to change notification settings - Fork 9
Formatted test and config code and updated test files #564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Also removed extra yarn commands that weren't needed, and automated download of browserslist updates on build.
droberts-ctrlo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All files have been reformatted with imports "cleaned up" as well as any comments given - where no comments are given in files, this means that the aforementioned formatting and cleanup is all that has happened and files have no changes in functionality.
This is ready for merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was regenerated and set up as part of the new version of Jest installation - changes will be annotated, otherwise, it's just formatting and the fact the new version has modified placement of some configuration settings
| // Automatically restore mock state and implementation before every test | ||
| // restoreMocks: false, | ||
| // The paths to modules that run some code to configure or set up the testing environment before each test | ||
| setupFiles: ['<rootDir>/src/frontend/testing/setup.ts'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now running setup file rather than having global config have to be imported every time
| // The test environment that will be used for testing | ||
| testEnvironment: "jsdom", | ||
| // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped | ||
| testPathIgnorePatterns: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore these paths for testing - this is just to ensure we don't end up with the watcher (if it's being run) running ad infinitum should we not wish it to, as well as general efficiency.
| "private": true, | ||
| "scripts": { | ||
| "build": "NODE_ENV=production webpack --progress --watch", | ||
| "build": "NODE_ENV=production webpack --progress", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No point in watching if it's a production build
| "lint": "eslint src", | ||
| "test": "jest", | ||
| "build:dev": "webpack --env development --progress -c webpack.config.js -w", | ||
| "build:dev": "webpack --env development --progress -w", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was using the default file anyway - no point in redefining a property that's already defined as that value
| @@ -1,18 +1,4 @@ | |||
| import { XmlHttpRequestLike } from "../js/lib/util/upload/UploadControl"; | |||
| import {TextEncoder, TextDecoder} from "util"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to setup file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified incorrect paths setup that didn't allow includes to be mapped correctly - also formatting
|
|
||
| describe('common functions', () => { | ||
| describe.skip('CSS and ARIA - skipped as they are incorrect',()=>{ | ||
| describe('CSS and ARIA', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified code to ensure these are correct and pass as expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modifications to allow for proper testing
…ctrlo#576) This change is being reverted as it was allowing users who do not have access to fields to enable them to be blanked.
A fix to close the password reset modal on cancel.
Close modal on cancel
Also removed extra yarn commands that weren't needed, and automated download of browserslist updates on build.
…into jest-cleanup
…into jest-cleanup
|
Squashing and redoing merge |
Also removed extra yarn commands that weren't needed, and automated download of browserslist updates on build.