postman-app-support
postman-app-support copied to clipboard
Fixing "Using "CryptoJS" is deprecated. Use "require('crypto-js')" instead." console warning results in breaking newman test run
Is there an existing issue for this?
- [X] I have searched the tracker for existing similar issues and I know that duplicates will be closed
Describe the Issue
Post V11 release I started seeing various warnings in the Postman app console.
This is the last one I am having trouble resolving:
Using "CryptoJS" is deprecated. Use "require('crypto-js')" instead.
Steps To Reproduce
- Have Postman upgraded to V11+
- Use CriptoJs package to decode jwt in the Scripts
- Run the test in Postman with console open
Notice how Postman console throws the following warning:
Using "CryptoJS" is deprecated. Use "require('crypto-js')" instead. - Get the warning silenced by defining CryptoJS
const CryptoJS = require('crypto-js') - Re-run the test in Postman app Notice how CriptoJS warning is no longer showing
- Run the same Postman collection with newman
Expected Outcome: newman test rune completes without errors
Actual Outcome:
newman test run results in the following error:
Identifier 'CryptoJS' has already been declared at test-script inside [Call Name]
Screenshots or Videos
No response
Operating System
macOS
Postman Version
11.8.1
Postman Platform
Postman App
User Account Type
Signed In User
Additional Context?
Newman version 6.2.1