josephus
should be a function.
testString: assert(typeof josephus=='function','josephus
should be a function.');
- text: josephus(30,3)
should return a number.
testString: assert(typeof josephus(30,3)=='number','josephus(30,3)
should return a number.');
- text: josephus(30,3)
should return 29
.
testString: assert.equal(josephus(30,3),29,'josephus(30,3)
should return 29
.');
- text: josephus(30,5)
should return 3
.
testString: assert.equal(josephus(30,5),3,'josephus(30,5)
should return 3
.');
- text: josephus(20,2)
should return 9
.
testString: assert.equal(josephus(20,2),9,'josephus(20,2)
should return 9
.');
- text: josephus(17,6)
should return 2
.
testString: assert.equal(josephus(17,6),2,'josephus(17,6)
should return 2
.');
- text: josephus(29,4)
should return 2
.
testString: assert.equal(josephus(29,4),2,'josephus(29,4)
should return 2
.');
```