Skip to content
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

fix: jest warning value provided is not in a recognized RFC2822 or ISO format. #553

Merged
merged 2 commits into from
Mar 10, 2024

Conversation

aviv1620
Copy link
Collaborator

@aviv1620 aviv1620 commented Mar 5, 2024

Description

fix the warning when jest say:

    Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ 
for more info.
    Arguments: 
    [0] _isAMomentObject: true, _isUTC: true, _useUTC: true, _l: undefined, _i: null, _f: undefined, _strict: undefined, _locale: [object Object]
    Error
        at Function.createFromInputFallback (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\moment\moment.js:324:25)
        at configFromString (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\moment\moment.js:2613:19)
        at configFromInput (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\moment\moment.js:3056:13)
        at prepareConfig (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\moment\moment.js:3039:13)
        at createFromConfig (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\moment\moment.js:3006:44)
        at createLocalOrUTC (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\moment\moment.js:3100:16)
        at Function.createUTC [as utc] (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\moment\moment.js:106:16)
        at parseTime (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\src\api\gapsService.ts:15:36)
        at Object.<anonymous> (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\src\pages\components\utils\index.test.ts:62:28)
        at Promise.then.completed (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\jest-circus\build\utils.js:298:28)
        at new Promise (<anonymous>)
        at callAsyncCircusFn (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\jest-circus\build\utils.js:231:10)
        at _callCircusTest (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\jest-circus\build\run.js:316:40)
        at processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async _runTest (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\jest-circus\build\run.js:252:3)
        at async _runTestsForDescribeBlock (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\jest-circus\build\run.js:126:9)
        at async _runTestsForDescribeBlock (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\jest-circus\build\run.js:121:9)
        at async run (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\jest-circus\build\run.js:71:3)
        at async runAndTransformResultsToJestFormat (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\jest-circus\build\legacy-code-todo-rewrite\jestAdapterInit.js:122:21)
        at async jestAdapter (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\jest-circus\build\legacy-code-todo-rewrite\jestAdapter.js:79:19)
        at async runTestInternal (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\jest-runner\build\runTest.js:367:16)
        at async runTest (C:\Users\avivh\Desktop\projects\Open_Bus\open-bus-map-search\node_modules\jest-runner\build\runTest.js:444:34)```

@aviv1620 aviv1620 requested a review from NoamGaash as a code owner March 5, 2024 08:55
Copy link
Member

@NoamGaash NoamGaash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@Darkmift Darkmift merged commit b30089f into main Mar 10, 2024
17 checks passed
@Darkmift Darkmift deleted the fix-jest-warning branch March 10, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants