first version
This commit is contained in:
+7
-10
@@ -1,14 +1,11 @@
|
||||
const test = require('ava')
|
||||
|
||||
const { sleep, sync } = require('../index')
|
||||
const { diff } = require('../index')
|
||||
|
||||
test('sync function from native code', (t) => {
|
||||
const fixture = 42
|
||||
t.is(sync(fixture), fixture + 100)
|
||||
})
|
||||
|
||||
test('sleep function from native code', async (t) => {
|
||||
const timeToSleep = 200
|
||||
const value = await sleep(timeToSleep)
|
||||
t.is(value, timeToSleep * 2)
|
||||
test('diff', (t) => {
|
||||
const left = 'asd'
|
||||
const right = 'asd'
|
||||
const result = diff(left, right)
|
||||
console.log(result)
|
||||
t.is(result.length, 1)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user