Skip to content

Instantly share code, notes, and snippets.

@jaamaalxyz
Created August 12, 2018 05:05
Show Gist options
  • Save jaamaalxyz/4e782886bac1e5fcd3e2c0d3be5686cd to your computer and use it in GitHub Desktop.
Save jaamaalxyz/4e782886bac1e5fcd3e2c0d3be5686cd to your computer and use it in GitHub Desktop.
const assert = require('assert');
const operations = require('./operations');
// Below test cases for input validation
it('indicates failure when a string is used instead of a number', () => {
assert.equal(operations.validateNumbers('beauty', 10), false)
});
it('indicates failure when two strings is used instead of numbers', () => {
assert.equal(operations.validateNumbers('Jamal', 'Beauty'), false)
});
it('successfully run when two inputs are number', () => {
assert.equal(operations.validateNumbers(10, 10), true)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment