My use case for this is Jasmine-Node, so the require statements have no meaning to me. If you are using browser-based Jasmine, you will need to use RequireJS for this solution. Alternatively, without any statements, you can use this example from Jasmine's repository issues .
file1.js
module.exports = function() { describe('sub group - 1', function () {
file2.js
module.exports = function() { describe('sub group - 2', function () {
file3.js
var subgroup1 = require( './file1.js' ); var subgroup2 = require( './file2.js' ); describe('Main Group - Module 1', function () { beforeEach(function () { module('app'); }); subgroup1(); subgroup2(); });
source share