BREAKING CHANGE(improved the loading of the environment. Can now be used in sync environments.): update
This commit is contained in:
@ -5,14 +5,14 @@ import * as smartntml from '../ts/index.js';
|
||||
let testSmartntmlInstance: smartntml.Smartntml;
|
||||
|
||||
tap.test('first test', async () => {
|
||||
testSmartntmlInstance = await smartntml.Smartntml.create();
|
||||
testSmartntmlInstance = new smartntml.Smartntml();
|
||||
});
|
||||
|
||||
tap.test('should render a string', async () => {
|
||||
const arrayArg = [1, 2, 3, 4, 5, 6];
|
||||
const stringResult = await testSmartntmlInstance.renderTemplateResult(testSmartntmlInstance.html`
|
||||
const stringResult = await testSmartntmlInstance.renderTemplateResult(smartntml.deesElement.html`
|
||||
<div class="hello">${arrayArg.map(
|
||||
(element) => testSmartntmlInstance.html`<div>${element}</div>`
|
||||
(element) => smartntml.deesElement.html`<div>${element}</div>`
|
||||
)}</div>
|
||||
`);
|
||||
console.log(stringResult);
|
||||
|
Reference in New Issue
Block a user