Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*jslint node: true, nomen: true, sloppy: true, newcap: true */
- var vows = require('vows'),
- utils = require('./util');
- vows.describe('array stuffs').addBatch(util.parallelize({
- 'when I have an array': {
- topic: function () {
- return [1, 2, 3];
- },
- 'and I push': {
- topic: function (data) {
- data.push(4);
- return data;
- },
- 'it adds 4 to the list': function (data) {
- assert.equal(data.toString(), '1,2,3,4');
- }
- },
- 'and I pop': {
- topic: function (data) {
- data.pop();
- return data;
- },
- 'it has 2 items': function (data) {
- assert.equal(data.length, 2);
- }
- }
- }
- })).exportTo(module);
Add Comment
Please, Sign In to add comment