I am new to Dojo, and I am learning it from the tutorials from the [stie] https://v5.dojo.io/tutorials/002_creating_an_application/ because I could not find any video tutorials on youtube or elsewhere. my problem is the section I linked [here] https://v5.dojo.io/tutorials/002_creating_an_application/ , at the section " Widgets" it says " Create a widget HelloWorld.ts
in src/widgets
" so I did, but afterward one section further at the testing it said … w(Banner, {}));
and had nothing to do with the HelloWorld component. and I got confused, I had to read multiple times until I understood what is happening. Maybe it’s a good way to make people read the code more but it’s still misleading.
Also, I had to open another project to understand that I actually had to incorporate more code than it’s shown there. the site said to add,
it('should render', () => {
const h = harness(() => w(Banner, {}));
h.expect(() => v('h1', { title: 'I am a title!' }, [ 'Biz-E-Bodies' ]));
});
``
but I anded up adding this.
const { describe, it } = intern.getInterface('bdd');
import { v, w } from '@dojo/framework/widget-core/d';
import harness from '@dojo/framework/testing/harness';
import Banner from '../../../src/widgets/Banner';
describe('Banner', () => {
it('should render', () => {
const h = harness(() => w(Banner, {}));
h.expect(() => v('h1', { title: 'I am a title!' }, [ 'Biz-E-Bodies' ]));
});
});
again with help from another project's code.
Have a look at angulars documentation it's much more detailed and kept consistent.
I am not trying to offend anyways or anything I think Dojo is cool but it makes it harder for me to learn
(https://v5.dojo.io/tutorials/002_creating_an_application/) (https://v5.dojo.io/tutorials/002_creating_an_application/)