issue13
Version:
Penis.js, Vagina.js, Hole.js, Ass.js, and Mouth.js as an npm package.
27 lines (24 loc) • 747 B
JavaScript
var Ass = require('./ass')
var assert = require('node:assert')
try {
var ass = new Ass()
assert.throws(function() {
ass.shove('test', 42)
}, 'should throw an error when shoving something in if ass is closed')
assert.doesNotThrow(function() {
ass.open()
ass.shove('test', 42)
ass.wipe()
ass.close()
}, 'should not throw an error when shoving something in if ass is open')
ass.open()
ass.shove('test', 42)
assert(ass.contents.test === 42, 'shove should set a property on contents')
ass.wipe()
assert(typeof ass.contents.test === 'undefined', 'wipe should delete properties on ass')
ass.close()
console.log('ass tests passed')
} catch(e) {
throw e
throw new Error('ass tests failed: ' + e.message)
}