You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
529 B
18 lines
529 B
/* global describe, it */
|
|
|
|
var assert = require('assert')
|
|
var types = require('../src/types')
|
|
|
|
describe('types', function () {
|
|
describe('BigInt/ECPoint', function () {
|
|
it('return true for duck types', function () {
|
|
assert(types.BigInt(new function BigInteger () {}))
|
|
assert(types.ECPoint(new function Point () {}))
|
|
})
|
|
|
|
it('return false for bad types', function () {
|
|
assert(!types.BigInt(new function NotABigInteger () {}))
|
|
assert(!types.ECPoint(new function NotAPoint () {}))
|
|
})
|
|
})
|
|
})
|
|
|