Hi, I've been working on a port of the Jasmine [1] test environment to GJS and I have just cut a first release [2]. Feel free to try it out and I'd be happy to hear any feedback.
For a quick introduction to Jasmine, it's a test runner for JS that understands behavior-driven test suites like the following: const MyModule = imports.myModule; describe('My object', function () { let myObject; beforeEach(function () { myObject = new MyModule.MyObject(); }); it('constructs correctly', function () { expect(myObject).toBeDefined(); }); it('quotes Vogon poetry', function () { expect(myObject.getPoetry()).toMatch('Oh freddled gruntbuggly'); }); }); This port of Jasime can produce reports in several different formats, both human-readable and machine-readable. In particular, it can do TAP output so that you can integrate it nicely with Autotools. For more examples, see Jasmine GJS's own test suite [3]. For more info, see the upstream Jasmine documentation [4]. [1] https://github.com/jasmine/jasmine [2] https://github.com/ptomato/jasmine-gjs/releases/tag/2.1.3 [3] https://github.com/ptomato/jasmine-gjs/tree/master/test [4] http://jasmine.github.io/2.2/introduction.html Cheers, -- Philip
_______________________________________________ javascript-list mailing list javascript-list@gnome.org https://mail.gnome.org/mailman/listinfo/javascript-list