aimpress-chatbot/node_modules/rsa-pem-from-mod-exp/test/index.tests.js
“SamoilenkoVadym” 55445dbc86
Some checks failed
Build and deploy Node.js app to Azure Web App - ChatBot2222 / build (push) Has been cancelled
Build and deploy Node.js app to Azure Web App - ChatBot2222 / deploy (push) Has been cancelled
Deploy bot to Azure
2025-04-27 19:55:19 +01:00

14 lines
No EOL
420 B
JavaScript

var should = require('should');
var input = require('./input.json');
var getPem = require('../index');
describe('index', function(){
it('should generate the expected pem results', function(){
for (var i=0; i<input.length; i++) {
var val = input[i];
if (!val || !val.modulus || !val.exponent || !val.pem) continue;
var result = getPem(val.modulus, val.exponent);
result.should.equal(val.pem);
}
});
});