fix(core): update

This commit is contained in:
2022-05-28 17:29:36 +02:00
commit 4f3678c343
14 changed files with 10740 additions and 0 deletions

20
test/test.ts Normal file
View File

@ -0,0 +1,20 @@
import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
import * as smartntml from '../ts/index.js';
let testSmartntmlInstance: smartntml.Smartntml;
tap.test('first test', async () => {
testSmartntmlInstance = await smartntml.Smartntml.createAndInit();
});
tap.test('should render a string', async () => {
const arrayArg = [1, 2, 3, 4, 5, 6];
const stringResult = await testSmartntmlInstance.renderTemplateResult(testSmartntmlInstance.html`
<div class="hello">${arrayArg.map(
(element) => testSmartntmlInstance.html`<div>${element}</div>`
)}</div>
`);
console.log(stringResult);
});
tap.start();