Skip to content

Commit

Permalink
Arreglo seguridad
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiomalv committed May 3, 2022
1 parent 47be1bd commit 4c333d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion webapp/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ export default {
"\\.[jt]sx?$": "babel-jest",
"^.+\\.tsx?$": "ts-jest",
},
collectCoverage: true
collectCoverage: true,
setupFiles: ['<rootDir>/vars.ts']
}
4 changes: 2 additions & 2 deletions webapp/src/components/Order/Order.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jest.mock('../Services/OrderService');

test('check the payment form render properly', async () => {
const user: User = {
username: "user",
password: "user",
username: process.env.USER2!,
password: process.env.USER2!,
token: ""
};
const product: Producto = { category: 'cellular', name: 'IPhone', description: 'a', urlImage: 'aaaaa', basePrice: 200, units: 2, onSale: true, IVA: 0.21 };
Expand Down
4 changes: 3 additions & 1 deletion webapp/vars.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
process.env.USER = 'pruebaprueba'
process.env.PASS = 'PruebaPrueba1+'
process.env.BADUSER = 'pru'
process.env.BADPASS = 'Prueb'
process.env.BADPASS = 'Prueb'
process.env.USER2= 'user'
process.env.PASS2= 'user'

0 comments on commit 4c333d9

Please sign in to comment.