File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ const runner = new Jasmine();
225225### Load configuration from a file or from an object
226226
227227``` javascript
228- runner .loadConfigFile (' spec/support/jasmine.json' );
228+ await runner .loadConfigFile (' spec/support/jasmine.json' );
229229
230230runner .loadConfig ({
231231 spec_dir: ' spec' ,
@@ -305,10 +305,23 @@ runner.execute(['fooSpec.js'], 'a spec name');
305305### A simple example using the library
306306
307307``` javascript
308+ // CommonJS
308309const Jasmine = require (' jasmine' );
309310const runner = new Jasmine ();
310311
311- runner .loadConfigFile (' spec/support/jasmine.json' );
312+ runner .loadConfigFile (' spec/support/jasmine.json' )
313+ .then (function () {
314+ runner .configureDefaultReporter ({
315+ showColors: false
316+ });
317+ runner .execute ();
318+ });
319+
320+ // or ESM:
321+ import Jasmine from ' jasmine' ;
322+ const runner = new Jasmine ();
323+
324+ await runner .loadConfigFile (' spec/support/jasmine.json' );
312325runner .configureDefaultReporter ({
313326 showColors: false
314327});
You can’t perform that action at this time.
0 commit comments