Last active
March 11, 2016 23:07
-
-
Save mattmontgomery/05fa2d00497409c3966d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/** | |
* Installed `jest`, `jest-cli`; ran test with `--no-watchman` | |
*/ | |
describe('Helpers', function() { | |
jest.autoMockOff(); | |
var Helpers = require('../helpers'); | |
describe('isFloat', function() { | |
it('has isFloat as an export', function() { | |
expect(Helpers.isFloat).not.toBeNull(); | |
}); | |
var isFloat = Helpers.isFloat; | |
it('returns false on strings', function() { | |
expect(isFloat('test')).toBe(false); | |
}); | |
it('returns true on float', function() { | |
expect(isFloat(0.1)).toBe(true); | |
}) | |
it('returns false on not-float', function() { | |
expect(isFloat(1)).toBe(false); | |
}) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment