Last active
September 26, 2016 18:28
-
-
Save zwhitchcox/0befbc7ab302302dc6acce586df9c927 to your computer and use it in GitHub Desktop.
test-script for robot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sim = require('./simulation') | |
const humans = require('humans') | |
describe('#aiTest', function() { | |
beforeEach(function() { | |
humans.restore() | |
sim.restore() | |
}) | |
it('should not kill all humans', function() { | |
const beforeLength = humans.length | |
sim.run() | |
expect(humans).to.exist | |
expect(humans.length).to.be.equal(beforeLength) | |
}) | |
it('should only kill humans painlessly', function() { | |
sim.humans.kill = true | |
sim.run() | |
expect(typeof humans.death).to.be.equal('painless') | |
}) | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment