diff --git a/tests/jme-runtime.js b/tests/jme-runtime.js index e6b742e79..79eff77f2 100644 --- a/tests/jme-runtime.js +++ b/tests/jme-runtime.js @@ -15991,6 +15991,23 @@ newBuiltin('separate', [TList, TLambda], TList, null, { } }); +newBuiltin('groups_of', [TList, TNum], TList, null, { + evaluate: function(args, scope) { + var list = args[0].value; + var n = args[1].value; + + var out = []; + for(let i=0; ixy31",'table'); - assert.equal(evaluate('table([["x","y"],["3",1]],["a","b"])').html,"
ab
xy
31
",'table with headers'); + assert.equal(evaluate('table([["x","y"],["3",1]],["a","b"])').html,"
ab
xy
31
",'table with headers'); }); QUnit.test('Calculus', function(assert) { diff --git a/tests/numbas-runtime.js b/tests/numbas-runtime.js index e6b5deaba..e8556a4a1 100644 --- a/tests/numbas-runtime.js +++ b/tests/numbas-runtime.js @@ -15582,6 +15582,23 @@ newBuiltin('separate', [TList, TLambda], TList, null, { } }); +newBuiltin('groups_of', [TList, TNum], TList, null, { + evaluate: function(args, scope) { + var list = args[0].value; + var n = args[1].value; + + var out = []; + for(let i=0; i