forked from codigoencasa/builderbot
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(contexts): 🐛 fixed codigoencasa#524 issue
- Loading branch information
1 parent
7067b4a
commit 79cc31a
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |