Skip to content

Commit

Permalink
fix(contexts): 🐛 fixed codigoencasa#524 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
leifermendez committed Jan 23, 2023
1 parent 7067b4a commit 79cc31a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions packages/bot/tests/flow.class.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const { test } = require('uvu')
const assert = require('uvu/assert')
const FlowClass = require('../io/flow.class')
const MockProvider = require('../../../__mocks__/mock.provider')
const { addKeyword } = require('../index')

test(`[FlowClass] Probando instanciamiento de clase`, async () => {
const MOCK_FLOW = addKeyword('hola').addAnswer('Buenas!')
const flowClass = new FlowClass([MOCK_FLOW])
assert.is(flowClass instanceof FlowClass, true)
})

test(`[FlowClass] Probando find`, async () => {
const MOCK_FLOW = addKeyword('hola').addAnswer('Buenas!')
const flowClass = new FlowClass([MOCK_FLOW])

flowClass.find('hola')
assert.is(flowClass instanceof FlowClass, true)
})

test(`[FlowClass] Probando findBySerialize`, async () => {
const MOCK_FLOW = addKeyword('hola').addAnswer('Buenas!')
const flowClass = new FlowClass([MOCK_FLOW])

flowClass.findBySerialize('')
assert.is(flowClass instanceof FlowClass, true)
})

test.run()

0 comments on commit 79cc31a

Please sign in to comment.