-
Notifications
You must be signed in to change notification settings - Fork 50
EPMRPP-89496 || Migrate client-javascript to TypeScript #229
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
Open
maria-hambardzumian
wants to merge
11
commits into
develop
Choose a base branch
from
feature/EPMRPP-89496-Migrate-client-javascript-to-TypeScript
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9b57a83
EPMRPP-89496 || Migrate client-javascript to TypeScript
f37e43a
EPMRPP-89496 || Migrate client-javascript to TypeScript
592eaf4
Fix package.json files
AmsterGet 48cc77c
EPMRPP-89496 || made adjustments & added skip issue
df98279
EPMRPP-89496 || crf
4fcad70
EPMRPP-89496 || fixed build
a13463e
EPMRPP-89496 || fixed linter
7683668
EPMRPP-89496 || downgrade Jest to v28 for Node compatibility
cf79a74
EPMRPP-89496 || crf - 2
24e8805
EPMRPP-89496 || build fix
5b4604e
EPMRPP-89496 || version fix
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,40 +1,38 @@ | ||
| { | ||
| "env": { | ||
| "es6": true, | ||
| "node": true | ||
| }, | ||
| "extends": [ | ||
| "airbnb-base", | ||
| "airbnb-typescript/base", | ||
| "plugin:@typescript-eslint/recommended", | ||
| "plugin:prettier/recommended" | ||
| "plugin:prettier/recommended", | ||
| "plugin:import/recommended" | ||
| ], | ||
| "plugins": ["prettier", "import"], | ||
| "plugins": ["prettier"], | ||
| "globals": { | ||
| "Atomics": "readonly", | ||
| "SharedArrayBuffer": "readonly" | ||
| }, | ||
| "parser": "@typescript-eslint/parser", | ||
| "parserOptions": { | ||
| "ecmaVersion": 2018, | ||
| "sourceType": "module", | ||
| "project": "./tsconfig.eslint.json" | ||
| }, | ||
| "globals": { | ||
| "expectAsync": true | ||
| }, | ||
| "env": { | ||
| "node": true, | ||
| "es6": true, | ||
| "jest": true | ||
| "project": "./tsconfig.eslint.json" | ||
| }, | ||
| "rules": { | ||
| "valid-jsdoc": ["error", { "requireReturn": false }], | ||
| "consistent-return": 0, | ||
| "@typescript-eslint/no-plusplus": 0, | ||
| "no-plusplus": 0, | ||
| "prettier/prettier": 2, | ||
| "class-methods-use-this": 0, | ||
| "no-else-return": 0, | ||
| "@typescript-eslint/lines-between-class-members": 0, | ||
| "lines-between-class-members": 0, | ||
| "import/no-extraneous-dependencies": 0, | ||
| "func-names": 0, | ||
| "import/prefer-default-export": 0, | ||
| "@typescript-eslint/naming-convention": 0, | ||
| "@typescript-eslint/dot-notation": 0, | ||
| "@typescript-eslint/ban-ts-ignore": 0, | ||
| "@typescript-eslint/ban-ts-comment": 0, | ||
| "@typescript-eslint/no-var-requires": 0, | ||
| "@typescript-eslint/no-floating-promises": 2, | ||
| "max-classes-per-file": 0 | ||
| "@typescript-eslint/no-implied-eval": 0, | ||
| "dot-notation": 0, | ||
| "@typescript-eslint/naming-convention": 0 | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,53 @@ | ||
| import { OUTPUT_TYPES } from '../lib/constants/outputs'; | ||
|
|
||
| describe('OUTPUT_TYPES', () => { | ||
| let consoleLogSpy: jest.SpyInstance; | ||
| let consoleErrorSpy: jest.SpyInstance; | ||
|
|
||
| beforeEach(() => { | ||
| consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(); | ||
| consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(); | ||
| process.env.RP_LAUNCH_UUID = ''; | ||
| }); | ||
|
|
||
| afterEach(() => { | ||
| jest.restoreAllMocks(); | ||
| }); | ||
|
|
||
| describe('STDOUT', () => { | ||
| it('should log launch UUID to console.log', () => { | ||
| const testUuid = 'test-launch-uuid-123'; | ||
|
|
||
| OUTPUT_TYPES.STDOUT(testUuid); | ||
|
|
||
| expect(consoleLogSpy).toHaveBeenCalledWith(`Report Portal Launch UUID: ${testUuid}`); | ||
| }); | ||
| }); | ||
|
|
||
| describe('STDERR', () => { | ||
| it('should log launch UUID to console.error', () => { | ||
| const testUuid = 'test-launch-uuid-456'; | ||
|
|
||
| OUTPUT_TYPES.STDERR(testUuid); | ||
|
|
||
| expect(consoleErrorSpy).toHaveBeenCalledWith(`Report Portal Launch UUID: ${testUuid}`); | ||
| }); | ||
| }); | ||
|
|
||
| describe('ENVIRONMENT', () => { | ||
| it('should set RP_LAUNCH_UUID environment variable', () => { | ||
| const testUuid = 'test-launch-uuid-789'; | ||
|
|
||
| OUTPUT_TYPES.ENVIRONMENT(testUuid); | ||
|
|
||
| expect(process.env.RP_LAUNCH_UUID).toBe(testUuid); | ||
| }); | ||
| }); | ||
|
|
||
| describe('FILE', () => { | ||
| it('should be a function reference to helpers.saveLaunchUuidToFile', () => { | ||
| expect(typeof OUTPUT_TYPES.FILE).toBe('function'); | ||
| expect(OUTPUT_TYPES.FILE).toBeDefined(); | ||
| }); | ||
| }); | ||
| }); |
4 changes: 2 additions & 2 deletions
4
__tests__/publicReportingAPI.spec.js → __tests__/publicReportingAPI.spec.ts
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Remove deprecated rule '@typescript-eslint/ban-ts-ignore' to prevent ESLint failure
This rule was removed years ago and will trigger “Definition for rule not found”.
Apply this diff:
- "@typescript-eslint/ban-ts-ignore": 0,📝 Committable suggestion
🤖 Prompt for AI Agents