From 6dd9f35221a0fb0bba9875f75e21d4c02bcb4f5a Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Tue, 3 Dec 2024 15:51:52 +0700 Subject: [PATCH] Create security.test.js --- tests/security.test.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/security.test.js diff --git a/tests/security.test.js b/tests/security.test.js new file mode 100644 index 000000000..2ca7f0396 --- /dev/null +++ b/tests/security.test.js @@ -0,0 +1,17 @@ +// tests/security.test.js +const Security = require('../security'); // Assuming you have a security module + +describe('Security Module', () => { + test('should encrypt data correctly', () => { + const data = 'sensitive data'; + const encryptedData = Security.encrypt(data); + expect(encryptedData).not.toBe(data); + }); + + test('should decrypt data correctly', () => { + const data = 'sensitive data'; + const encryptedData = Security.encrypt(data); + const decryptedData = Security.decrypt(encryptedData); + expect(decryptedData).toBe(data); + }); +});