fix(core): update

This commit is contained in:
2023-07-13 14:07:12 +02:00
parent 0acb00c9c4
commit db268d4fad
15 changed files with 2358 additions and 12436 deletions

View File

@ -1,12 +1,12 @@
import { expect, tap } from '@pushrocks/tapbundle';
import { expect, tap } from '@push.rocks/tapbundle';
import * as smartinteract from '../ts/index';
import * as smartinteract from '../ts/index.js';
let testInteract: smartinteract.SmartInteract;
tap.test('should create a valid new instance', async () => {
testInteract = new smartinteract.SmartInteract();
expect(testInteract).to.be.instanceOf(smartinteract.SmartInteract);
expect(testInteract).toBeInstanceOf(smartinteract.SmartInteract);
});
tap.test('should get a simple confirmation', async () => {
@ -14,7 +14,7 @@ tap.test('should get a simple confirmation', async () => {
'You feel awesome, right?',
true
);
expect(response).to.be.true;
expect(response).toBeTrue();
});
tap.test('should add question to SmartInteract instance', async () => {
@ -46,9 +46,9 @@ tap.test('should add question to SmartInteract instance', async () => {
tap.test('should use default value when not in CI', async () => {
const answerBucket = await testInteract.runQueue();
expect(answerBucket.getAnswerFor('testQuestion1')).to.equal('blue');
expect(answerBucket.getAnswerFor('testQuestion2')).to.equal('red');
expect(answerBucket.getAnswerFor('some.dotted.name')).to.equal('aValidAnswer');
expect(answerBucket.getAnswerFor('testQuestion1')).toEqual('blue');
expect(answerBucket.getAnswerFor('testQuestion2')).toEqual('red');
expect(answerBucket.getAnswerFor('some.dotted.name')).toEqual('aValidAnswer');
});
tap.start();