Get help with testing, discuss unit testing strategies etc.


Post by Clothia C »

In my siesta.js the project.start works, but if I am going for project.plan instead, it's not working. Can you help?

siesta.js:

const project = new Siesta.Project.Browser.ExtJS();

project.configure({
    title           : 'Basic browser test suite',
    transparentEx   : true,
    autoCheckGlobals: true,
    expectedGlobals : ['Ext'],
    preload         : ['../index.html']
});

// project.start({
//     url: '010_sanity.t.js'
// });

project.plan(
    '010_sanity.t.js'
);

010_sanity.t.js

describe('Sanity Test', t => {
    t.it("Sanity", t => {
        t.diag("Sanity test, loading classes on demand and verifying they were indeed loaded.")

    t.ok(Ext, 'ExtJS is here');

    t.requireOk('MyApp.view.Viewport');
});
})

Last edited by Clothia C on Fri Jan 22, 2021 12:49 pm, edited 1 time in total.

Post by nickolay »

Thats correct, project.plan() just plans the tests execution (add them to internal list). This call can be repeated several times.

Once you are happy with the plan and to actually launch the project - call project.start()


Post by Clothia C »

Awesome. Adding project.start() did the job. Thanks

Please add that line to
https://www.bryntum.com/docs/siesta/#!/api/Siesta.Project-method-plan


Post Reply