mirror of
https://github.com/cupcakearmy/occulto.git
synced 2024-12-22 04:56:26 +00:00
add different import options
This commit is contained in:
parent
c52623da0c
commit
a015d4f46a
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "occulto",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"description": "crypt utility",
|
||||
"main": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
|
@ -5,3 +5,8 @@ export default {
|
||||
RSA,
|
||||
AES,
|
||||
}
|
||||
|
||||
export {
|
||||
AES,
|
||||
RSA,
|
||||
}
|
18
test/main.js
18
test/main.js
@ -1,7 +1,23 @@
|
||||
const { describe, it } = require('mocha')
|
||||
const a = require('assert')
|
||||
|
||||
const { RSA, AES } = require('../').default
|
||||
|
||||
describe('Check imports', () => {
|
||||
it('default', () => {
|
||||
const Occulto = require('../').default
|
||||
|
||||
a.notStrictEqual(undefined, Occulto.RSA)
|
||||
a.notStrictEqual(undefined, Occulto.AES)
|
||||
})
|
||||
it('normal', () => {
|
||||
const {RSA, AES} = require('../')
|
||||
|
||||
a.notStrictEqual(undefined, RSA)
|
||||
a.notStrictEqual(undefined, AES)
|
||||
})
|
||||
})
|
||||
|
||||
const { RSA, AES } = require('../')
|
||||
|
||||
describe('Asymmetric', () => {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user