2020-08-24 17:16:35 +09:00
|
|
|
import test from 'ava'
|
2020-08-03 00:31:22 +09:00
|
|
|
|
|
|
|
const bindings = require('../index.node')
|
|
|
|
|
|
|
|
test('should create class', (t) => {
|
|
|
|
const TestClass = bindings.createTestClass()
|
|
|
|
const fixture = 20
|
|
|
|
const testClass = new TestClass(fixture)
|
|
|
|
t.is(testClass.count, fixture)
|
|
|
|
const add = 101
|
|
|
|
testClass.addCount(add)
|
|
|
|
t.is(testClass.count, fixture + add)
|
|
|
|
})
|